summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-23 13:16:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-23 14:43:26 (GMT)
commit491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch)
tree10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty
parentda7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff)
downloadswift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip
swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty')
-rw-r--r--3rdParty/Boost/01_fix_return_type_warning.diff13
-rw-r--r--3rdParty/Boost/SConscript19
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/detail/case_conv.hpp6
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/detail/classification.hpp4
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/detail/formatter.hpp25
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/find.hpp8
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/formatter.hpp23
-rw-r--r--3rdParty/Boost/src/boost/algorithm/string/iter_find.hpp6
-rw-r--r--3rdParty/Boost/src/boost/array.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_datagram_socket.hpp188
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_deadline_timer.hpp85
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_io_object.hpp184
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_raw_socket.hpp187
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_seq_packet_socket.hpp514
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_serial_port.hpp161
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_signal_set.hpp384
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_socket.hpp538
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_socket_acceptor.hpp366
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_socket_iostream.hpp151
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_socket_streambuf.hpp386
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_stream_socket.hpp148
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_streambuf.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_streambuf_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/basic_waitable_timer.hpp518
-rw-r--r--3rdParty/Boost/src/boost/asio/buffer.hpp1348
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_read_stream.hpp101
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_read_stream_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_stream.hpp9
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_stream_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_write_stream.hpp90
-rw-r--r--3rdParty/Boost/src/boost/asio/buffered_write_stream_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/buffers_iterator.hpp59
-rw-r--r--3rdParty/Boost/src/boost/asio/completion_condition.hpp58
-rw-r--r--3rdParty/Boost/src/boost/asio/connect.hpp816
-rw-r--r--3rdParty/Boost/src/boost/asio/datagram_socket_service.hpp109
-rw-r--r--3rdParty/Boost/src/boost/asio/deadline_timer.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/deadline_timer_service.hpp27
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/array.hpp40
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/array_fwd.hpp11
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/atomic_count.hpp47
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/base_from_completion_cond.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/bind_handler.hpp98
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/buffer_resize_guard.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp171
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/buffered_stream_storage.hpp21
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/call_stack.hpp69
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/chrono_time_traits.hpp129
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/completion_handler.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/config.hpp186
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/consuming_buffers.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/date_time_fwd.hpp34
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/deadline_timer_service.hpp58
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/dependent_type.hpp38
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/descriptor_ops.hpp18
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/descriptor_read_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/descriptor_write_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/dev_poll_reactor.hpp36
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/dev_poll_reactor_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/epoll_reactor.hpp76
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/epoll_reactor_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/event.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/eventfd_select_interrupter.hpp11
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/fd_set_adapter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/fenced_block.hpp16
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/gcc_arm_fenced_block.hpp19
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/gcc_hppa_fenced_block.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/gcc_sync_fenced_block.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/gcc_x86_fenced_block.hpp44
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/handler_alloc_helpers.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/handler_tracking.hpp161
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/handler_type_requirements.hpp362
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/hash_map.hpp38
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/descriptor_ops.ipp111
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/dev_poll_reactor.hpp9
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/dev_poll_reactor.ipp123
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/epoll_reactor.hpp9
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/epoll_reactor.ipp361
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/eventfd_select_interrupter.ipp49
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/handler_tracking.ipp299
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/kqueue_reactor.hpp9
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/kqueue_reactor.ipp165
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/pipe_select_interrupter.ipp27
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/posix_event.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/posix_mutex.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/posix_thread.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/posix_tss_ptr.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/reactive_descriptor_service.ipp87
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/reactive_serial_port_service.ipp8
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/reactive_socket_service_base.ipp71
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/resolver_service_base.ipp34
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/select_reactor.hpp9
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/select_reactor.ipp77
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/service_registry.hpp20
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/service_registry.ipp40
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/signal_set_service.ipp593
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/socket_ops.ipp304
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/socket_select_interrupter.ipp22
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/strand_service.hpp58
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/strand_service.ipp93
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/task_io_service.hpp23
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/task_io_service.ipp322
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/throw_error.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/timer_queue_ptime.ipp82
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/timer_queue_set.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_event.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_handle_service.ipp86
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_io_service.hpp28
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_io_service.ipp36
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_serial_port_service.ipp8
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_iocp_socket_service_base.ipp104
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_mutex.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_object_handle_service.ipp446
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_static_mutex.ipp120
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_tss_ptr.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/winsock_init.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/io_control.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/keyword_tss_ptr.hpp72
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/kqueue_reactor.hpp46
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/kqueue_reactor_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/macos_fenced_block.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/mutex.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/noncopyable.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_event.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_fenced_block.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_mutex.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_signal_blocker.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_static_mutex.hpp62
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_thread.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_tss_ptr.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/object_pool.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/old_win_sdk_compat.hpp126
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/op_queue.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/operation.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/pipe_select_interrupter.hpp11
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/pop_options.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_event.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_fd_set_adapter.hpp11
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_mutex.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_signal_blocker.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_static_mutex.hpp66
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_thread.hpp4
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/posix_tss_ptr.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/push_options.hpp3
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp67
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_null_buffers_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_serial_port_service.hpp29
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_accept_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_connect_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_recv_op.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_recvfrom_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_recvmsg_op.hpp127
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_send_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_sendto_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_service.hpp52
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactive_socket_service_base.hpp145
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactor.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactor_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactor_op.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/reactor_op_queue.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/regex_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/resolve_endpoint_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/resolve_op.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/resolver_service.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/resolver_service_base.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/scoped_lock.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/scoped_ptr.hpp81
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/select_interrupter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/select_reactor.hpp37
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/select_reactor_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/service_registry.hpp20
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/service_registry_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/shared_ptr.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/signal_blocker.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/signal_handler.hpp83
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/signal_init.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/signal_op.hpp51
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/signal_set_service.hpp213
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/socket_holder.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/socket_ops.hpp39
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/socket_option.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/socket_select_interrupter.hpp11
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/socket_types.hpp4
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/solaris_fenced_block.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/static_mutex.hpp49
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/strand_service.hpp41
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/task_io_service.hpp76
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/task_io_service_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/task_io_service_operation.hpp18
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/thread.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/throw_error.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_queue.hpp160
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_queue_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_queue_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_queue_ptime.hpp91
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_queue_set.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_scheduler.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/timer_scheduler_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/tss_ptr.hpp8
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/wait_handler.hpp22
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/wait_op.hpp (renamed from 3rdParty/Boost/src/boost/asio/detail/timer_op.hpp)16
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/weak_ptr.hpp15
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_event.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_fd_set_adapter.hpp65
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_fenced_block.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_handle_read_op.hpp18
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_handle_service.hpp51
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_handle_write_op.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_io_service.hpp60
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_io_service_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_null_buffers_op.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_operation.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_op.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_overlapped_ptr.hpp10
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_serial_port_service.hpp28
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_accept_op.hpp19
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_recv_op.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp118
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_send_op.hpp17
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_service.hpp67
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_iocp_socket_service_base.hpp133
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_mutex.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_object_handle_service.hpp185
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_static_mutex.hpp76
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_thread.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/win_tss_ptr.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/wince_thread.hpp4
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/winsock_init.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/wrapped_handler.hpp63
-rw-r--r--3rdParty/Boost/src/boost/asio/error.hpp26
-rw-r--r--3rdParty/Boost/src/boost/asio/handler_alloc_hook.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/handler_invoke_hook.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/connect.hpp391
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/error.ipp28
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/io_service.hpp53
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/io_service.ipp30
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/read.hpp366
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/read_at.hpp387
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/read_until.hpp288
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/serial_port_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/serial_port_base.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/write.hpp397
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/write_at.hpp414
-rw-r--r--3rdParty/Boost/src/boost/asio/io_service.hpp131
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/address.hpp21
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/address_v4.hpp43
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/address_v6.hpp24
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/basic_endpoint.hpp28
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/basic_resolver.hpp29
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/basic_resolver_entry.hpp12
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/basic_resolver_iterator.hpp27
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/basic_resolver_query.hpp67
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/detail/endpoint.hpp7
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/detail/impl/endpoint.ipp22
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/detail/socket_option.hpp45
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/host_name.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/icmp.hpp14
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address.ipp42
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address_v4.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address_v4.ipp26
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address_v6.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/address_v6.ipp91
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/basic_endpoint.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/impl/host_name.ipp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/multicast.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/resolver_query_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/resolver_service.hpp32
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/tcp.hpp12
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/udp.hpp12
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/unicast.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/ip/v6_only.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/is_read_buffered.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/is_write_buffered.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/local/basic_endpoint.hpp31
-rw-r--r--3rdParty/Boost/src/boost/asio/local/connect_pair.hpp4
-rw-r--r--3rdParty/Boost/src/boost/asio/local/datagram_protocol.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/local/detail/endpoint.hpp6
-rw-r--r--3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp22
-rw-r--r--3rdParty/Boost/src/boost/asio/local/stream_protocol.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/placeholders.hpp16
-rw-r--r--3rdParty/Boost/src/boost/asio/posix/basic_descriptor.hpp240
-rw-r--r--3rdParty/Boost/src/boost/asio/posix/basic_stream_descriptor.hpp82
-rw-r--r--3rdParty/Boost/src/boost/asio/posix/descriptor_base.hpp5
-rw-r--r--3rdParty/Boost/src/boost/asio/posix/stream_descriptor.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/posix/stream_descriptor_service.hpp100
-rw-r--r--3rdParty/Boost/src/boost/asio/raw_socket_service.hpp109
-rw-r--r--3rdParty/Boost/src/boost/asio/read.hpp92
-rw-r--r--3rdParty/Boost/src/boost/asio/read_at.hpp92
-rw-r--r--3rdParty/Boost/src/boost/asio/read_until.hpp34
-rw-r--r--3rdParty/Boost/src/boost/asio/seq_packet_socket_service.hpp341
-rw-r--r--3rdParty/Boost/src/boost/asio/serial_port.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/serial_port_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/serial_port_service.hpp68
-rw-r--r--3rdParty/Boost/src/boost/asio/signal_set.hpp30
-rw-r--r--3rdParty/Boost/src/boost/asio/signal_set_service.hpp128
-rw-r--r--3rdParty/Boost/src/boost/asio/socket_acceptor_service.hpp86
-rw-r--r--3rdParty/Boost/src/boost/asio/socket_base.hpp10
-rw-r--r--3rdParty/Boost/src/boost/asio/strand.hpp38
-rw-r--r--3rdParty/Boost/src/boost/asio/stream_socket_service.hpp98
-rw-r--r--3rdParty/Boost/src/boost/asio/streambuf.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/time_traits.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/version.hpp4
-rw-r--r--3rdParty/Boost/src/boost/asio/wait_traits.hpp43
-rw-r--r--3rdParty/Boost/src/boost/asio/waitable_timer_service.hpp161
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp94
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_object_handle.hpp177
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp96
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp87
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/object_handle.hpp40
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/object_handle_service.hpp170
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp12
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp72
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp68
-rw-r--r--3rdParty/Boost/src/boost/asio/write.hpp82
-rw-r--r--3rdParty/Boost/src/boost/asio/write_at.hpp91
-rw-r--r--3rdParty/Boost/src/boost/bind/bind.hpp2
-rw-r--r--3rdParty/Boost/src/boost/chrono/ceil.hpp36
-rw-r--r--3rdParty/Boost/src/boost/chrono/chrono.hpp15
-rw-r--r--3rdParty/Boost/src/boost/chrono/clock_string.hpp25
-rw-r--r--3rdParty/Boost/src/boost/chrono/config.hpp215
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/inlined/chrono.hpp44
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/inlined/mac/chrono.hpp241
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/inlined/posix/chrono.hpp120
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp160
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/is_evenly_divisible_by.hpp31
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/static_assert.hpp30
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/system.hpp29
-rw-r--r--3rdParty/Boost/src/boost/chrono/duration.hpp795
-rw-r--r--3rdParty/Boost/src/boost/chrono/system_clocks.hpp233
-rw-r--r--3rdParty/Boost/src/boost/chrono/time_point.hpp379
-rw-r--r--3rdParty/Boost/src/boost/compressed_pair.hpp24
-rw-r--r--3rdParty/Boost/src/boost/concept/detail/backward_compatibility.hpp2
-rw-r--r--3rdParty/Boost/src/boost/concept_check.hpp10
-rw-r--r--3rdParty/Boost/src/boost/config.hpp2
-rw-r--r--3rdParty/Boost/src/boost/config/auto_link.hpp9
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/borland.hpp62
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/clang.hpp99
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/codegear.hpp40
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/common_edg.hpp50
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/cray.hpp63
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/digitalmars.hpp51
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/gcc.hpp88
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/gcc_xml.hpp48
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/hp_acc.hpp49
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/intel.hpp72
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/metrowerks.hpp50
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/mpw.hpp50
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/pathscale.hpp84
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/pgi.hpp102
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/sunpro_cc.hpp50
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/vacpp.hpp60
-rw-r--r--3rdParty/Boost/src/boost/config/compiler/visualc.hpp147
-rw-r--r--3rdParty/Boost/src/boost/config/platform/cray.hpp18
-rw-r--r--3rdParty/Boost/src/boost/config/platform/linux.hpp5
-rw-r--r--3rdParty/Boost/src/boost/config/platform/macos.hpp9
-rw-r--r--3rdParty/Boost/src/boost/config/platform/symbian.hpp7
-rw-r--r--3rdParty/Boost/src/boost/config/platform/win32.hpp2
-rw-r--r--3rdParty/Boost/src/boost/config/select_compiler_config.hpp31
-rw-r--r--3rdParty/Boost/src/boost/config/select_platform_config.hpp6
-rw-r--r--3rdParty/Boost/src/boost/config/select_stdlib_config.hpp6
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/dinkumware.hpp57
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/libcomo.hpp47
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/libcpp.hpp15
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/libstdcpp3.hpp72
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/modena.hpp47
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/msl.hpp47
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/roguewave.hpp53
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/sgi.hpp47
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/stlport.hpp51
-rw-r--r--3rdParty/Boost/src/boost/config/stdlib/vacpp.hpp47
-rw-r--r--3rdParty/Boost/src/boost/config/suffix.hpp307
-rw-r--r--3rdParty/Boost/src/boost/config/warning_disable.hpp2
-rw-r--r--3rdParty/Boost/src/boost/container/allocator_traits.hpp385
-rw-r--r--3rdParty/Boost/src/boost/container/container_fwd.hpp173
-rw-r--r--3rdParty/Boost/src/boost/container/detail/config_begin.hpp49
-rw-r--r--3rdParty/Boost/src/boost/container/detail/config_end.hpp17
-rw-r--r--3rdParty/Boost/src/boost/container/detail/memory_util.hpp77
-rw-r--r--3rdParty/Boost/src/boost/container/detail/mpl.hpp160
-rw-r--r--3rdParty/Boost/src/boost/container/detail/pair.hpp353
-rw-r--r--3rdParty/Boost/src/boost/container/detail/preprocessor.hpp230
-rw-r--r--3rdParty/Boost/src/boost/container/detail/type_traits.hpp210
-rw-r--r--3rdParty/Boost/src/boost/container/detail/utilities.hpp252
-rw-r--r--3rdParty/Boost/src/boost/container/detail/workaround.hpp40
-rw-r--r--3rdParty/Boost/src/boost/container/scoped_allocator.hpp1466
-rw-r--r--3rdParty/Boost/src/boost/container/scoped_allocator_fwd.hpp83
-rw-r--r--3rdParty/Boost/src/boost/current_function.hpp3
-rw-r--r--3rdParty/Boost/src/boost/date_time/adjust_functors.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/c_local_time_adjustor.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/c_time.hpp18
-rw-r--r--3rdParty/Boost/src/boost/date_time/compiler_config.hpp28
-rw-r--r--3rdParty/Boost/src/boost/date_time/constrained_value.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date.hpp6
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_clock_device.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_defs.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_duration.hpp18
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_duration_types.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_facet.hpp11
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_format_simple.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_formatting.hpp12
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_formatting_limited.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_formatting_locales.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_generator_formatter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_generator_parser.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_generators.hpp70
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_iterator.hpp30
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_names_put.hpp52
-rw-r--r--3rdParty/Boost/src/boost/date_time/date_parsing.hpp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/dst_rules.hpp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/dst_transition_generators.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/filetime_functions.hpp8
-rw-r--r--3rdParty/Boost/src/boost/date_time/format_date_parser.hpp8
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/conversion.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/formatters.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/formatters_limited.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_calendar.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_date.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_day.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_day_of_year.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_duration.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_duration_types.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_facet.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_month.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_weekday.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_year.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/greg_ymd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/gregorian.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/gregorian_io.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/gregorian_types.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian/parsers.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian_calendar.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/gregorian_calendar.ipp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/int_adapter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/iso_format.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/conversion.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/custom_time_zone.hpp12
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/date_duration_operators.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/dst_transition_day_rules.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/local_date_time.hpp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/local_time.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/local_time_io.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/local_time_types.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/posix_time_zone.hpp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/local_time/tz_database.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/locale_config.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/microsec_time_clock.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/parse_format_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/period.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/period_formatter.hpp10
-rw-r--r--3rdParty/Boost/src/boost/date_time/period_parser.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/conversion.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/date_duration_operators.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time_config.hpp4
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time_duration.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time_io.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time_legacy_io.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/posix_time_system.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/ptime.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/time_formatters.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/time_formatters_limited.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/time_parsers.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/posix_time/time_period.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/special_defs.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/special_values_formatter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/string_convert.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/string_parse_tree.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/strings_from_facet.hpp6
-rw-r--r--3rdParty/Boost/src/boost/date_time/time.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_clock.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_defs.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_duration.hpp23
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_facet.hpp202
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_formatting_streams.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_iterator.hpp34
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_parsing.hpp9
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_resolution_traits.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_system_counted.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_system_split.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_zone_base.hpp18
-rw-r--r--3rdParty/Boost/src/boost/date_time/time_zone_names.hpp2
-rw-r--r--3rdParty/Boost/src/boost/date_time/tz_db_base.hpp17
-rw-r--r--3rdParty/Boost/src/boost/date_time/wrapping_int.hpp54
-rw-r--r--3rdParty/Boost/src/boost/date_time/year_month_day.hpp2
-rw-r--r--3rdParty/Boost/src/boost/detail/allocator_utilities.hpp212
-rw-r--r--3rdParty/Boost/src/boost/detail/call_traits.hpp20
-rw-r--r--3rdParty/Boost/src/boost/detail/compressed_pair.hpp443
-rw-r--r--3rdParty/Boost/src/boost/detail/container_fwd.hpp115
-rw-r--r--3rdParty/Boost/src/boost/detail/fenv.hpp74
-rw-r--r--3rdParty/Boost/src/boost/detail/interlocked.hpp54
-rw-r--r--3rdParty/Boost/src/boost/detail/is_incrementable.hpp134
-rw-r--r--3rdParty/Boost/src/boost/detail/ob_compressed_pair.hpp510
-rw-r--r--3rdParty/Boost/src/boost/detail/scoped_enum_emulation.hpp349
-rw-r--r--3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.ipp (renamed from 3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp)2
-rw-r--r--3rdParty/Boost/src/boost/detail/win/GetLastError.hpp27
-rw-r--r--3rdParty/Boost/src/boost/detail/win/basic_types.hpp111
-rw-r--r--3rdParty/Boost/src/boost/detail/win/time.hpp72
-rw-r--r--3rdParty/Boost/src/boost/detail/win/timers.hpp41
-rw-r--r--3rdParty/Boost/src/boost/exception/detail/attribute_noreturn.hpp2
-rw-r--r--3rdParty/Boost/src/boost/exception/detail/clone_current_exception.hpp47
-rw-r--r--3rdParty/Boost/src/boost/exception/detail/error_info_impl.hpp1
-rw-r--r--3rdParty/Boost/src/boost/exception/detail/exception_ptr.hpp321
-rw-r--r--3rdParty/Boost/src/boost/exception/detail/type_info.hpp6
-rw-r--r--3rdParty/Boost/src/boost/exception/diagnostic_information.hpp58
-rw-r--r--3rdParty/Boost/src/boost/exception/exception.hpp53
-rw-r--r--3rdParty/Boost/src/boost/exception/info.hpp3
-rw-r--r--3rdParty/Boost/src/boost/filesystem.hpp29
-rw-r--r--3rdParty/Boost/src/boost/filesystem/config.hpp104
-rw-r--r--3rdParty/Boost/src/boost/filesystem/convenience.hpp (renamed from 3rdParty/Boost/src/boost/filesystem/v3/convenience.hpp)22
-rw-r--r--3rdParty/Boost/src/boost/filesystem/exception.hpp40
-rw-r--r--3rdParty/Boost/src/boost/filesystem/fstream.hpp181
-rw-r--r--3rdParty/Boost/src/boost/filesystem/operations.hpp1095
-rw-r--r--3rdParty/Boost/src/boost/filesystem/path.hpp757
-rw-r--r--3rdParty/Boost/src/boost/filesystem/path_traits.hpp (renamed from 3rdParty/Boost/src/boost/filesystem/v3/path_traits.hpp)22
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/config.hpp106
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/convenience.hpp339
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/exception.hpp9
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/fstream.hpp613
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/operations.hpp1245
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v2/path.hpp1571
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/config.hpp85
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/exception.hpp9
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp208
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/operations.hpp1052
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/path.hpp713
-rw-r--r--3rdParty/Boost/src/boost/foreach.hpp54
-rw-r--r--3rdParty/Boost/src/boost/function.hpp4
-rw-r--r--3rdParty/Boost/src/boost/function/function_base.hpp24
-rw-r--r--3rdParty/Boost/src/boost/function/function_template.hpp125
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/container_fwd_0x.hpp29
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float.hpp195
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp91
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float_x86.hpp56
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/extensions.hpp101
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/hash.hpp183
-rw-r--r--3rdParty/Boost/src/boost/implicit_cast.hpp29
-rw-r--r--3rdParty/Boost/src/boost/indirect_reference.hpp43
-rw-r--r--3rdParty/Boost/src/boost/integer.hpp34
-rw-r--r--3rdParty/Boost/src/boost/integer/integer_mask.hpp126
-rw-r--r--3rdParty/Boost/src/boost/integer_traits.hpp4
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/config_begin.hpp52
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/config_end.hpp15
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/has_member_function_callable_with.hpp356
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/memory_util.hpp288
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/mpl.hpp367
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/preprocessor.hpp52
-rw-r--r--3rdParty/Boost/src/boost/intrusive/detail/workaround.hpp22
-rw-r--r--3rdParty/Boost/src/boost/intrusive/pointer_traits.hpp265
-rw-r--r--3rdParty/Boost/src/boost/iterator.hpp2
-rw-r--r--3rdParty/Boost/src/boost/iterator/iterator_adaptor.hpp8
-rw-r--r--3rdParty/Boost/src/boost/iterator/iterator_facade.hpp68
-rw-r--r--3rdParty/Boost/src/boost/iterator/reverse_iterator.hpp2
-rw-r--r--3rdParty/Boost/src/boost/iterator/transform_iterator.hpp25
-rw-r--r--3rdParty/Boost/src/boost/lambda/bind.hpp19
-rw-r--r--3rdParty/Boost/src/boost/lambda/core.hpp79
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/actions.hpp174
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/arity_code.hpp110
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/bind_functions.hpp1879
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/function_adaptors.hpp789
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/is_instance_of.hpp104
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/lambda_config.hpp48
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/lambda_functor_base.hpp615
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/lambda_functors.hpp324
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/lambda_fwd.hpp74
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/lambda_traits.hpp578
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/member_ptr.hpp737
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/operator_actions.hpp139
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/operator_lambda_func_base.hpp271
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/operator_return_type_traits.hpp917
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/operators.hpp370
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/ret.hpp325
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/return_type_traits.hpp282
-rw-r--r--3rdParty/Boost/src/boost/lambda/detail/select_functions.hpp74
-rw-r--r--3rdParty/Boost/src/boost/lambda/lambda.hpp34
-rw-r--r--3rdParty/Boost/src/boost/lexical_cast.hpp2614
-rw-r--r--3rdParty/Boost/src/boost/logic/tribool.hpp4
-rw-r--r--3rdParty/Boost/src/boost/make_shared.hpp17
-rw-r--r--3rdParty/Boost/src/boost/math/common_factor_ct.hpp180
-rw-r--r--3rdParty/Boost/src/boost/math/common_factor_rt.hpp530
-rw-r--r--3rdParty/Boost/src/boost/math/policies/policy.hpp982
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp570
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp80
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp537
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp1296
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/sign.hpp145
-rw-r--r--3rdParty/Boost/src/boost/math/tools/config.hpp330
-rw-r--r--3rdParty/Boost/src/boost/math/tools/promotion.hpp150
-rw-r--r--3rdParty/Boost/src/boost/math/tools/real_cast.hpp29
-rw-r--r--3rdParty/Boost/src/boost/math/tools/user.hpp97
-rw-r--r--3rdParty/Boost/src/boost/math_fwd.hpp108
-rw-r--r--3rdParty/Boost/src/boost/move/move.hpp1273
-rw-r--r--3rdParty/Boost/src/boost/mpl/O1_size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/O1_size_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/advance.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/advance_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/always.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/and.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/apply.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/apply_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/apply_wrap.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/arg.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/arg_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/assert.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/at.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/at_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/O1_size_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/adl_barrier.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/advance_backward.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/advance_forward.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/arg_typedef.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/arithmetic_op.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/arity.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/arity_spec.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/at_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/begin_end_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/clear_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/common_name_wknd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/comparison_op.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/adl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/arrays.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/bind.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/compiler.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/ctps.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/dependent_nttp.hpp35
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/dtp.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/eti.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/forwarding.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/gcc.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/has_apply.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/integral.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/intel.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/lambda.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/msvc.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/msvc_typename.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/nttp.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/overload_resolution.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/pp_counter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/preprocessor.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/static_constant.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/ttp.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/typeof.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/use_preprocessed.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/config/workaround.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/contains_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/count_args.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/empty_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/fold_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/fold_impl_body.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/front_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/full_lambda.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_apply.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_begin.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_rebind.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/has_type.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/include_preprocessed.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/inserter_algorithm.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/integral_wrapper.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/is_msvc_eti_arg.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/iter_apply.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/iter_fold_if_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/iter_fold_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/lambda_arity_param.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/lambda_no_ctps.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/lambda_spec.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/lambda_support.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/largest_int.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/logical_op.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/msvc_dtw.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/msvc_eti_base.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/msvc_is_class.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/msvc_never_true.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/msvc_type.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/na.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/na_assert.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/na_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/na_spec.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/nested_type_wknd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/nttp_decl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/numeric_cast_utils.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/numeric_op.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/add.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/def_params_tail.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/default_params.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/enum.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/ext_params.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/filter_params.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/params.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/partial_spec_params.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/range.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/repeat.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/sub.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/preprocessor/tuple.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/push_back_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/push_front_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/reverse_fold_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/reverse_fold_impl_body.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/sequence_wrapper.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/size_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/static_cast.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/template_arity_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/traits_lambda_spec.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/type_wrapper.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/value_wknd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/aux_/yes_no.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/back_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/back_inserter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/begin_end.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/begin_end_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/bind.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/bind_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/bool.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/bool_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/clear.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/clear_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/comparison.hpp24
-rw-r--r--3rdParty/Boost/src/boost/mpl/contains.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/contains_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/copy.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/deref.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/distance.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/distance_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/empty.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/empty_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/equal.hpp112
-rw-r--r--3rdParty/Boost/src/boost/mpl/equal_to.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/eval_if.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/find.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/find_if.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/fold.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/front_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/front_inserter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/greater.hpp21
-rw-r--r--3rdParty/Boost/src/boost/mpl/greater_equal.hpp21
-rw-r--r--3rdParty/Boost/src/boost/mpl/has_xxx.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/identity.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/if.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/inserter.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/int.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/int_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/integral_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/integral_c_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/integral_c_tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/is_placeholder.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/is_sequence.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/iter_fold.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/iter_fold_if.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/iterator_category.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/iterator_range.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/iterator_tags.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/lambda.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/lambda_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/less.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/less_equal.hpp21
-rw-r--r--3rdParty/Boost/src/boost/mpl/limits/arity.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/limits/list.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/limits/unrolling.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/limits/vector.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/O1_size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/begin_end.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/clear.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/empty.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/include_preprocessed.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/item.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/iterator.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/numbered.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/numbered_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/pop_front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/push_back.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/push_front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/aux_/tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list0.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list0_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list10.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list10_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list20.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list20_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list30.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list30_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list40.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list40_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list50.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/list/list50_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/logical.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/long.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/long_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/max_element.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/min_max.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/minus.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/multiplies.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/negate.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/next.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/next_prior.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/not.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/not_equal_to.hpp21
-rw-r--r--3rdParty/Boost/src/boost/mpl/numeric_cast.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/or.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/pair.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/pair_view.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/placeholders.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/plus.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/pop_back_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/pop_front_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/prior.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/protect.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/push_back.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/push_back_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/push_front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/push_front_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/quote.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/remove_if.hpp83
-rw-r--r--3rdParty/Boost/src/boost/mpl/reverse_fold.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/same_as.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/sequence_tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/sequence_tag_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/size_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/size_t.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/size_t_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/sizeof.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/times.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/transform.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/O1_size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/at.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/back.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/begin_end.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/clear.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/empty.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/include_preprocessed.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/item.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/iterator.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/numbered.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/numbered_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/pop_back.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/pop_front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/push_back.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/push_front.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/size.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/tag.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/aux_/vector0.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector0.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector0_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector10.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector10_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector20.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector20_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector30.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector30_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector40.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector40_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector50.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/vector/vector50_c.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/void.hpp2
-rw-r--r--3rdParty/Boost/src/boost/mpl/void_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/none.hpp2
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/cast.hpp32
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/converter_policies.hpp8
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/detail/numeric_cast_traits.hpp138
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp1741
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp347
-rw-r--r--3rdParty/Boost/src/boost/numeric/conversion/numeric_cast_traits.hpp31
-rw-r--r--3rdParty/Boost/src/boost/operators.hpp4
-rw-r--r--3rdParty/Boost/src/boost/optional/optional.hpp4
-rw-r--r--3rdParty/Boost/src/boost/optional/optional_fwd.hpp9
-rw-r--r--3rdParty/Boost/src/boost/pending/integer_log2.hpp112
-rw-r--r--3rdParty/Boost/src/boost/pointee.hpp74
-rw-r--r--3rdParty/Boost/src/boost/pointer_to_other.hpp55
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/cat.hpp4
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/config/config.hpp43
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/facilities/overload.hpp25
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/detail/iter/forward1.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/detail/iter/forward2.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/detail/iter/forward3.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/detail/iter/forward4.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/detail/iter/forward5.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/iteration/iterate.hpp6
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/punctuation/paren_if.hpp38
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/repeat_2nd.hpp17
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/repetition/enum_shifted.hpp68
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/seq/cat.hpp9
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/seq/size.hpp1
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/tuple/eat.hpp117
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/tuple/elem.hpp516
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/tuple/rem.hpp158
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/tuple/to_list.hpp126
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/variadic/elem.hpp94
-rw-r--r--3rdParty/Boost/src/boost/preprocessor/variadic/size.hpp30
-rw-r--r--3rdParty/Boost/src/boost/program_options/config.hpp7
-rw-r--r--3rdParty/Boost/src/boost/program_options/detail/cmdline.hpp12
-rw-r--r--3rdParty/Boost/src/boost/program_options/detail/config_file.hpp2
-rw-r--r--3rdParty/Boost/src/boost/program_options/detail/parsers.hpp6
-rw-r--r--3rdParty/Boost/src/boost/program_options/detail/value_semantic.hpp7
-rw-r--r--3rdParty/Boost/src/boost/program_options/errors.hpp454
-rw-r--r--3rdParty/Boost/src/boost/program_options/options_description.hpp10
-rw-r--r--3rdParty/Boost/src/boost/program_options/parsers.hpp30
-rw-r--r--3rdParty/Boost/src/boost/program_options/value_semantic.hpp18
-rw-r--r--3rdParty/Boost/src/boost/program_options/variables_map.hpp13
-rw-r--r--3rdParty/Boost/src/boost/random/detail/const_mod.hpp363
-rw-r--r--3rdParty/Boost/src/boost/random/detail/generator_bits.hpp36
-rw-r--r--3rdParty/Boost/src/boost/random/detail/generator_seed_seq.hpp40
-rw-r--r--3rdParty/Boost/src/boost/random/detail/integer_log2.hpp84
-rw-r--r--3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp122
-rw-r--r--3rdParty/Boost/src/boost/random/detail/operators.hpp84
-rw-r--r--3rdParty/Boost/src/boost/random/detail/pass_through_engine.hpp100
-rw-r--r--3rdParty/Boost/src/boost/random/detail/seed.hpp29
-rw-r--r--3rdParty/Boost/src/boost/random/detail/seed_impl.hpp397
-rw-r--r--3rdParty/Boost/src/boost/random/detail/signed_unsigned_tools.hpp2
-rw-r--r--3rdParty/Boost/src/boost/random/detail/uniform_int_float.hpp83
-rw-r--r--3rdParty/Boost/src/boost/random/linear_congruential.hpp403
-rw-r--r--3rdParty/Boost/src/boost/random/mersenne_twister.hpp684
-rw-r--r--3rdParty/Boost/src/boost/random/uniform_01.hpp273
-rw-r--r--3rdParty/Boost/src/boost/random/uniform_int.hpp319
-rw-r--r--3rdParty/Boost/src/boost/random/uniform_int_distribution.hpp400
-rw-r--r--3rdParty/Boost/src/boost/random/uniform_real.hpp108
-rw-r--r--3rdParty/Boost/src/boost/random/variate_generator.hpp222
-rw-r--r--[-rwxr-xr-x]3rdParty/Boost/src/boost/range/algorithm/equal.hpp20
-rw-r--r--3rdParty/Boost/src/boost/range/as_literal.hpp2
-rw-r--r--3rdParty/Boost/src/boost/range/detail/detail_str.hpp4
-rw-r--r--[-rwxr-xr-x]3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp0
-rw-r--r--[-rwxr-xr-x]3rdParty/Boost/src/boost/range/detail/misc_concept.hpp0
-rw-r--r--3rdParty/Boost/src/boost/range/detail/size_type.hpp33
-rw-r--r--3rdParty/Boost/src/boost/range/detail/value_type.hpp72
-rw-r--r--[-rwxr-xr-x]3rdParty/Boost/src/boost/range/iterator_range_core.hpp102
-rw-r--r--[-rwxr-xr-x]3rdParty/Boost/src/boost/range/iterator_range_io.hpp0
-rw-r--r--3rdParty/Boost/src/boost/range/size.hpp6
-rw-r--r--3rdParty/Boost/src/boost/range/size_type.hpp56
-rw-r--r--3rdParty/Boost/src/boost/ratio/config.hpp86
-rw-r--r--3rdParty/Boost/src/boost/ratio/detail/mpl/abs.hpp89
-rw-r--r--3rdParty/Boost/src/boost/ratio/detail/mpl/gcd.hpp124
-rw-r--r--3rdParty/Boost/src/boost/ratio/detail/mpl/lcm.hpp126
-rw-r--r--3rdParty/Boost/src/boost/ratio/detail/mpl/sign.hpp89
-rw-r--r--3rdParty/Boost/src/boost/ratio/detail/overflow_helpers.hpp367
-rw-r--r--3rdParty/Boost/src/boost/ratio/mpl/rational_c_tag.hpp25
-rw-r--r--3rdParty/Boost/src/boost/ratio/ratio.hpp233
-rw-r--r--3rdParty/Boost/src/boost/ratio/ratio_fwd.hpp84
-rw-r--r--3rdParty/Boost/src/boost/rational.hpp609
-rw-r--r--3rdParty/Boost/src/boost/regex/config.hpp11
-rw-r--r--3rdParty/Boost/src/boost/regex/icu.hpp26
-rw-r--r--3rdParty/Boost/src/boost/regex/pending/object_cache.hpp4
-rw-r--r--3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp78
-rw-r--r--3rdParty/Boost/src/boost/regex/user.hpp3
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp19
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp88
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp41
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp12
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/instances.hpp5
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/match_results.hpp5
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp5
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/perl_matcher_non_recursive.hpp8
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/regex_format.hpp16
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/regex_iterator.hpp2
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp6
-rw-r--r--3rdParty/Boost/src/boost/signals/connection.hpp2
-rw-r--r--3rdParty/Boost/src/boost/signals/detail/named_slot_map.hpp2
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr.hpp6
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/shared_count.hpp88
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base.hpp3
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp9
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp150
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_impl.hpp12
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_has_sync.hpp6
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/spinlock.hpp5
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/spinlock_gcc_arm.hpp48
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/spinlock_pool.hpp4
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp18
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/make_shared.hpp517
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/shared_array.hpp30
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp42
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/weak_ptr.hpp36
-rw-r--r--3rdParty/Boost/src/boost/system/config.hpp17
-rw-r--r--3rdParty/Boost/src/boost/thread/barrier.hpp8
-rw-r--r--3rdParty/Boost/src/boost/thread/condition.hpp16
-rw-r--r--3rdParty/Boost/src/boost/thread/cv_status.hpp26
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/config.hpp141
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/delete.hpp45
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/memory.hpp156
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/move.hpp196
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/platform.hpp4
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/thread.hpp423
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/thread_interruption.hpp23
-rw-r--r--3rdParty/Boost/src/boost/thread/exceptions.hpp227
-rw-r--r--3rdParty/Boost/src/boost/thread/future.hpp1243
-rw-r--r--3rdParty/Boost/src/boost/thread/locks.hpp966
-rw-r--r--3rdParty/Boost/src/boost/thread/once.hpp4
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp225
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/condition_variable_fwd.hpp164
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/mutex.hpp141
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/once.hpp80
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/recursive_mutex.hpp135
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/shared_mutex.hpp274
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/thread_data.hpp139
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/thread_heap_alloc.hpp8
-rw-r--r--3rdParty/Boost/src/boost/thread/shared_mutex.hpp9
-rw-r--r--3rdParty/Boost/src/boost/thread/thread.hpp3
-rw-r--r--3rdParty/Boost/src/boost/thread/v2/thread.hpp56
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/basic_recursive_mutex.hpp60
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/basic_timed_mutex.hpp84
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/condition_variable.hpp249
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/interlocked_read.hpp20
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/mutex.hpp12
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/once.hpp55
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/recursive_mutex.hpp13
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/shared_mutex.hpp314
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/thread_data.hpp127
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp106
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/thread_primitives.hpp71
-rw-r--r--3rdParty/Boost/src/boost/thread/xtime.hpp12
-rw-r--r--3rdParty/Boost/src/boost/throw_exception.hpp17
-rw-r--r--3rdParty/Boost/src/boost/token_functions.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits.hpp7
-rw-r--r--3rdParty/Boost/src/boost/type_traits/add_rvalue_reference.hpp9
-rw-r--r--3rdParty/Boost/src/boost/type_traits/alignment_of.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/common_type.hpp10
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/bool_trait_def.hpp29
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/bool_trait_undef.hpp5
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/common_type_imp.hpp81
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/cv_traits_impl.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/has_binary_operator.hpp229
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/has_postfix_operator.hpp202
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/has_prefix_operator.hpp210
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_def.hpp10
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_undef.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/type_trait_def.hpp10
-rw-r--r--3rdParty/Boost/src/boost/type_traits/detail/type_trait_undef.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_and.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_and_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_or.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_or_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_xor.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_bit_xor_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_complement.hpp32
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_dereference.hpp31
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_divides.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_divides_assign.hpp47
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_equal_to.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_greater.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_greater_equal.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_left_shift.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_left_shift_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_less.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_less_equal.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_logical_and.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_logical_not.hpp23
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_logical_or.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_minus.hpp60
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_minus_assign.hpp65
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_modulus.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_modulus_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_multiplies.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_multiplies_assign.hpp47
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_negate.hpp25
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_not_equal_to.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_nothrow_assign.hpp16
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_nothrow_constructor.hpp24
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_nothrow_copy.hpp24
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_operator.hpp51
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_plus.hpp54
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_plus_assign.hpp66
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_post_decrement.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_post_increment.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_pre_decrement.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_pre_increment.hpp40
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_right_shift.hpp49
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_right_shift_assign.hpp55
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_trivial_assign.hpp17
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_trivial_constructor.hpp8
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_trivial_copy.hpp25
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_trivial_destructor.hpp17
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_unary_minus.hpp25
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_unary_plus.hpp23
-rw-r--r--3rdParty/Boost/src/boost/type_traits/has_virtual_destructor.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/integral_promotion.hpp20
-rw-r--r--3rdParty/Boost/src/boost/type_traits/intrinsics.hpp170
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_const.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_convertible.hpp27
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_empty.hpp16
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_enum.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_function.hpp6
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_fundamental.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_member_function_pointer.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_member_pointer.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_pod.hpp14
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_pointer.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_union.hpp8
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_unsigned.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_virtual_base_of.hpp6
-rw-r--r--3rdParty/Boost/src/boost/type_traits/is_volatile.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/msvc/typeof.hpp4
-rw-r--r--3rdParty/Boost/src/boost/type_traits/promote.hpp2
-rw-r--r--3rdParty/Boost/src/boost/type_traits/remove_cv.hpp3
-rw-r--r--3rdParty/Boost/src/boost/type_traits/remove_pointer.hpp53
-rw-r--r--3rdParty/Boost/src/boost/type_traits/transform_traits.hpp21
-rw-r--r--3rdParty/Boost/src/boost/type_traits/type_with_alignment.hpp10
-rw-r--r--3rdParty/Boost/src/boost/typeof/typeof.hpp17
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/allocate.hpp1241
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/allocator_helpers.hpp111
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/buckets.hpp882
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/equivalent.hpp939
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp82
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/fwd.hpp935
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/move.hpp243
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/node.hpp226
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/table.hpp1407
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/unique.hpp984
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/util.hpp321
-rw-r--r--3rdParty/Boost/src/boost/unordered/unordered_map.hpp1752
-rw-r--r--3rdParty/Boost/src/boost/unordered/unordered_map_fwd.hpp76
-rw-r--r--3rdParty/Boost/src/boost/utility.hpp1
-rw-r--r--3rdParty/Boost/src/boost/utility/declval.hpp9
-rw-r--r--3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp208
-rw-r--r--3rdParty/Boost/src/boost/utility/identity_type.hpp46
-rw-r--r--3rdParty/Boost/src/boost/utility/result_of.hpp187
-rw-r--r--3rdParty/Boost/src/boost/uuid/name_generator.hpp8
-rw-r--r--3rdParty/Boost/src/boost/uuid/random_generator.hpp3
-rw-r--r--3rdParty/Boost/src/boost/uuid/seed_rng.hpp28
-rw-r--r--3rdParty/Boost/src/boost/uuid/sha1.hpp61
-rw-r--r--3rdParty/Boost/src/boost/uuid/string_generator.hpp5
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp4
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/hash_variant.hpp48
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp5
-rw-r--r--3rdParty/Boost/src/boost/variant/recursive_variant.hpp63
-rw-r--r--3rdParty/Boost/src/boost/variant/variant.hpp61
-rw-r--r--3rdParty/Boost/src/boost/variant/variant_fwd.hpp2
-rw-r--r--3rdParty/Boost/src/boost/version.hpp7
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/gregorian/date_generators.cpp4
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/gregorian/greg_month.cpp10
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/gregorian/greg_names.hpp2
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/gregorian/greg_weekday.cpp2
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/gregorian/gregorian_types.cpp2
-rw-r--r--3rdParty/Boost/src/libs/date_time/src/posix_time/posix_time_types.cpp2
-rw-r--r--3rdParty/Boost/src/libs/exception/build/Jamfile.v214
-rw-r--r--3rdParty/Boost/src/libs/exception/src/clone_current_exception_non_intrusive.cpp320
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/codecvt_error_category.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/codecvt_error_category.cpp)17
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/filesystem_utf8_codecvt_facet.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/filesystem_utf8_codecvt_facet.cpp)6
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/operations.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/operations.cpp)479
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/path.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/path.cpp)356
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/path_traits.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/path_traits.cpp)21
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/portability.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/portability.cpp)19
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/unique_path.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/unique_path.cpp)15
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/windows_file_codecvt.cpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/windows_file_codecvt.cpp)14
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/windows_file_codecvt.hpp (renamed from 3rdParty/Boost/src/libs/filesystem/v3/src/windows_file_codecvt.hpp)2
-rw-r--r--3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp1372
-rw-r--r--3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp177
-rw-r--r--3rdParty/Boost/src/libs/filesystem/v2/src/v2_portability.cpp119
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/cmdline.cpp324
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/config_file.cpp6
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/options_description.cpp56
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/parsers.cpp10
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/positional_options.cpp2
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/program_options_utf8_codecvt_facet.cpp2
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/value_semantic.cpp279
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/variables_map.cpp132
-rw-r--r--3rdParty/Boost/src/libs/program_options/src/winmain.cpp4
-rw-r--r--3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp21
-rw-r--r--3rdParty/Boost/src/libs/regex/src/cregex.cpp17
-rw-r--r--3rdParty/Boost/src/libs/regex/src/fileiter.cpp12
-rw-r--r--3rdParty/Boost/src/libs/regex/src/internals.hpp35
-rw-r--r--3rdParty/Boost/src/libs/regex/src/posix_api.cpp11
-rw-r--r--3rdParty/Boost/src/libs/regex/src/regex.cpp1
-rw-r--r--3rdParty/Boost/src/libs/regex/src/regex_raw_buffer.cpp4
-rw-r--r--3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp21
-rw-r--r--3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp16
-rw-r--r--3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp6
-rw-r--r--3rdParty/Boost/src/libs/system/src/error_code.cpp3
-rwxr-xr-x3rdParty/Boost/src/libs/thread/src/future.cpp61
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/once.cpp51
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp232
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl17
-rw-r--r--3rdParty/Boost/src/libs/thread/src/tss_null.cpp4
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/thread.cpp331
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/timeconv.inl16
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/tss_dll.cpp1
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/tss_pe.cpp9
-rw-r--r--3rdParty/Boost/src/tools/bcp/add_path.cpp22
-rw-r--r--3rdParty/Boost/src/tools/bcp/bcp_imp.cpp6
-rw-r--r--3rdParty/Boost/src/tools/bcp/copy_path.cpp36
-rw-r--r--3rdParty/Boost/src/tools/bcp/file_types.cpp8
-rw-r--r--3rdParty/Boost/src/tools/bcp/fileview.cpp4
-rw-r--r--3rdParty/Boost/src/tools/bcp/licence_info.cpp2
-rw-r--r--3rdParty/Boost/src/tools/bcp/main.cpp2
-rw-r--r--3rdParty/Boost/src/tools/bcp/output_licence_info.cpp2
-rw-r--r--3rdParty/Boost/src/tools/bcp/path_operations.cpp4
-rw-r--r--3rdParty/Boost/src/tools/bcp/scan_cvs_path.cpp2
-rw-r--r--3rdParty/Boost/src/tools/bcp/scan_licence.cpp4
-rwxr-xr-x3rdParty/Boost/update.sh5
1201 files changed, 72838 insertions, 23803 deletions
diff --git a/3rdParty/Boost/01_fix_return_type_warning.diff b/3rdParty/Boost/01_fix_return_type_warning.diff
new file mode 100644
index 0000000..3f1fe83
--- /dev/null
+++ b/3rdParty/Boost/01_fix_return_type_warning.diff
@@ -0,0 +1,13 @@
+diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
+index 4321a26..c83eac1 100644
+--- a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
++++ b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
+@@ -27,6 +27,8 @@
+
+ #include "./timeconv.inl"
+
++#pragma GCC diagnostic ignored "-Wreturn-type"
++
+ namespace boost
+ {
+ namespace detail
diff --git a/3rdParty/Boost/SConscript b/3rdParty/Boost/SConscript
index f0d438b..6578736 100644
--- a/3rdParty/Boost/SConscript
+++ b/3rdParty/Boost/SConscript
@@ -65,17 +65,14 @@ elif env.get("BOOST_BUNDLED", False) :
"src/libs/signals/src/signal_base.cpp",
"src/libs/signals/src/slot.cpp",
"src/libs/signals/src/trackable.cpp",
- "src/libs/filesystem/v3/src/codecvt_error_category.cpp",
- "src/libs/filesystem/v3/src/operations.cpp",
- "src/libs/filesystem/v3/src/path.cpp",
- "src/libs/filesystem/v3/src/path_traits.cpp",
- "src/libs/filesystem/v3/src/portability.cpp",
- "src/libs/filesystem/v3/src/unique_path.cpp",
- "src/libs/filesystem/v3/src/windows_file_codecvt.cpp",
-# "src/libs/filesystem/v2/src/v2_operations.cpp",
-# "src/libs/filesystem/v2/src/v2_path.cpp",
-# "src/libs/filesystem/v2/src/v2_portability.cpp",
- "src/libs/filesystem/v3/src/filesystem_utf8_codecvt_facet.cpp",
+ "src/libs/filesystem/src/codecvt_error_category.cpp",
+ "src/libs/filesystem/src/operations.cpp",
+ "src/libs/filesystem/src/path.cpp",
+ "src/libs/filesystem/src/path_traits.cpp",
+ "src/libs/filesystem/src/portability.cpp",
+ "src/libs/filesystem/src/unique_path.cpp",
+ "src/libs/filesystem/src/windows_file_codecvt.cpp",
+ "src/libs/filesystem/src/filesystem_utf8_codecvt_facet.cpp",
"src/libs/regex/src/c_regex_traits.cpp",
"src/libs/regex/src/cpp_regex_traits.cpp",
"src/libs/regex/src/cregex.cpp",
diff --git a/3rdParty/Boost/src/boost/algorithm/string/detail/case_conv.hpp b/3rdParty/Boost/src/boost/algorithm/string/detail/case_conv.hpp
index 5b0064f..42621c7 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/detail/case_conv.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/detail/case_conv.hpp
@@ -15,6 +15,8 @@
#include <locale>
#include <functional>
+#include <boost/type_traits/make_unsigned.hpp>
+
namespace boost {
namespace algorithm {
namespace detail {
@@ -37,7 +39,7 @@ namespace boost {
CharT operator ()( CharT Ch ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
- return std::tolower( Ch);
+ return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
#else
return std::tolower<CharT>( Ch, *m_Loc );
#endif
@@ -57,7 +59,7 @@ namespace boost {
CharT operator ()( CharT Ch ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
- return std::toupper( Ch);
+ return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
#else
return std::toupper<CharT>( Ch, *m_Loc );
#endif
diff --git a/3rdParty/Boost/src/boost/algorithm/string/detail/classification.hpp b/3rdParty/Boost/src/boost/algorithm/string/detail/classification.hpp
index fb43955..704d9d2 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/detail/classification.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/detail/classification.hpp
@@ -126,7 +126,7 @@ namespace boost {
}
// Use fixed storage
- ::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);
+ ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);
}
// Destructor
@@ -206,7 +206,7 @@ namespace boost {
}
// Copy the data
- ::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);
+ ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size);
return *this;
}
diff --git a/3rdParty/Boost/src/boost/algorithm/string/detail/formatter.hpp b/3rdParty/Boost/src/boost/algorithm/string/detail/formatter.hpp
index bd6a780..8e7b727 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/detail/formatter.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/detail/formatter.hpp
@@ -87,6 +87,31 @@ namespace boost {
}
};
+// dissect format functor ----------------------------------------------------//
+
+ // dissect format functor
+ template<typename FinderT>
+ struct dissect_formatF
+ {
+ public:
+ // Construction
+ dissect_formatF(FinderT Finder) :
+ m_Finder(Finder) {}
+
+ // Operation
+ template<typename RangeT>
+ inline iterator_range<
+ BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+ operator()(const RangeT& Replace) const
+ {
+ return m_Finder(::boost::begin(Replace), ::boost::end(Replace));
+ }
+
+ private:
+ FinderT m_Finder;
+ };
+
+
} // namespace detail
} // namespace algorithm
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/algorithm/string/find.hpp b/3rdParty/Boost/src/boost/algorithm/string/find.hpp
index 304646d..cc99ca1 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/find.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/find.hpp
@@ -228,13 +228,13 @@ namespace boost {
//! Find head algorithm
/*!
Get the head of the input. Head is a prefix of the string of the
- given size. If the input is shorter then required, whole input if considered
+ given size. If the input is shorter then required, whole input is considered
to be the head.
\param Input An input string
\param N Length of the head
For N>=0, at most N characters are extracted.
- For N<0, size(Input)-|N| characters are extracted.
+ For N<0, at most size(Input)-|N| characters are extracted.
\return
An \c iterator_range delimiting the match.
Returned iterator is either \c Range1T::iterator or
@@ -258,13 +258,13 @@ namespace boost {
//! Find tail algorithm
/*!
Get the tail of the input. Tail is a suffix of the string of the
- given size. If the input is shorter then required, whole input if considered
+ given size. If the input is shorter then required, whole input is considered
to be the tail.
\param Input An input string
\param N Length of the tail.
For N>=0, at most N characters are extracted.
- For N<0, size(Input)-|N| characters are extracted.
+ For N<0, at most size(Input)-|N| characters are extracted.
\return
An \c iterator_range delimiting the match.
Returned iterator is either \c RangeT::iterator or
diff --git a/3rdParty/Boost/src/boost/algorithm/string/formatter.hpp b/3rdParty/Boost/src/boost/algorithm/string/formatter.hpp
index 50006df..ab5921e 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/formatter.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/formatter.hpp
@@ -36,7 +36,7 @@ namespace boost {
//! Constant formatter
/*!
- Construct the \c const_formatter. Const formatter always returns
+ Constructs a \c const_formatter. Const formatter always returns
the same value, regardless of the parameter.
\param Format A predefined value used as a result for formating
@@ -55,7 +55,7 @@ namespace boost {
//! Identity formatter
/*!
- Construct the \c identity_formatter. Identity formatter always returns
+ Constructs an \c identity_formatter. Identity formatter always returns
the parameter.
\return An instance of the \c identity_formatter object.
@@ -73,7 +73,7 @@ namespace boost {
//! Empty formatter
/*!
- Construct the \c empty_formatter. Empty formatter always returns an empty
+ Constructs an \c empty_formatter. Empty formatter always returns an empty
sequence.
\param Input container used to select a correct value_type for the
@@ -89,6 +89,22 @@ namespace boost {
BOOST_STRING_TYPENAME range_value<RangeT>::type>();
}
+ //! Empty formatter
+ /*!
+ Constructs a \c dissect_formatter. Dissect formatter uses a specified finder
+ to extract a portion of the formatted sequence. The first finder's match is returned
+ as a result
+
+ \param Finder a finder used to select a portion of the formated sequence
+ \return An instance of the \c dissect_formatter object.
+ */
+ template<typename FinderT>
+ inline detail::dissect_formatF< FinderT >
+ dissect_formatter(const FinderT& Finder)
+ {
+ return detail::dissect_formatF<FinderT>(Finder);
+ }
+
} // namespace algorithm
@@ -96,6 +112,7 @@ namespace boost {
using algorithm::const_formatter;
using algorithm::identity_formatter;
using algorithm::empty_formatter;
+ using algorithm::dissect_formatter;
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/algorithm/string/iter_find.hpp b/3rdParty/Boost/src/boost/algorithm/string/iter_find.hpp
index 9e0245f..e106528 100644
--- a/3rdParty/Boost/src/boost/algorithm/string/iter_find.hpp
+++ b/3rdParty/Boost/src/boost/algorithm/string/iter_find.hpp
@@ -60,7 +60,7 @@ namespace boost {
a match).
\param Input A container which will be searched.
\param Finder A Finder object used for searching
- \return A reference the result
+ \return A reference to the result
\note Prior content of the result will be overwritten.
*/
@@ -122,7 +122,7 @@ namespace boost {
Each match is used as a separator of segments. These segments are then
returned in the result.
- \param Result A 'container container' to container the result of search.
+ \param Result A 'container container' to contain the result of search.
Both outer and inner container must have constructor taking a pair
of iterators as an argument.
Typical type of the result is
@@ -131,7 +131,7 @@ namespace boost {
a match).
\param Input A container which will be searched.
\param Finder A finder object used for searching
- \return A reference the result
+ \return A reference to the result
\note Prior content of the result will be overwritten.
*/
diff --git a/3rdParty/Boost/src/boost/array.hpp b/3rdParty/Boost/src/boost/array.hpp
index 85b63a2..fa06fa9 100644
--- a/3rdParty/Boost/src/boost/array.hpp
+++ b/3rdParty/Boost/src/boost/array.hpp
@@ -13,6 +13,7 @@
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
+ * 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
@@ -46,6 +47,7 @@
// Handles broken standard libraries better than <iterator>
#include <boost/detail/iterator.hpp>
#include <boost/throw_exception.hpp>
+#include <boost/functional/hash_fwd.hpp>
#include <algorithm>
// FIXES for broken compilers
@@ -118,13 +120,13 @@ namespace boost {
// operator[]
reference operator[](size_type i)
{
- BOOST_ASSERT( i < N && "out of range" );
+ BOOST_ASSERT_MSG( i < N, "out of range" );
return elems[i];
}
const_reference operator[](size_type i) const
{
- BOOST_ASSERT( i < N && "out of range" );
+ BOOST_ASSERT_MSG( i < N, "out of range" );
return elems[i];
}
@@ -322,7 +324,7 @@ namespace boost {
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)
+#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
@@ -427,6 +429,13 @@ namespace boost {
}
#endif
+
+ 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());
+ }
+
} /* namespace boost */
diff --git a/3rdParty/Boost/src/boost/asio.hpp b/3rdParty/Boost/src/boost/asio.hpp
index 2681806..8205c55 100644
--- a/3rdParty/Boost/src/boost/asio.hpp
+++ b/3rdParty/Boost/src/boost/asio.hpp
@@ -2,7 +2,7 @@
// asio.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,12 +21,15 @@
#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/buffer.hpp>
#include <boost/asio/buffered_read_stream_fwd.hpp>
#include <boost/asio/buffered_read_stream.hpp>
@@ -36,6 +39,7 @@
#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/datagram_socket_service.hpp>
#include <boost/asio/deadline_timer_service.hpp>
#include <boost/asio/deadline_timer.hpp>
@@ -76,9 +80,12 @@
#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/strand.hpp>
@@ -86,9 +93,14 @@
#include <boost/asio/streambuf.hpp>
#include <boost/asio/time_traits.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_ptr.hpp>
#include <boost/asio/windows/random_access_handle.hpp>
#include <boost/asio/windows/random_access_handle_service.hpp>
diff --git a/3rdParty/Boost/src/boost/asio/basic_datagram_socket.hpp b/3rdParty/Boost/src/boost/asio/basic_datagram_socket.hpp
index a79967f..a773315 100644
--- a/3rdParty/Boost/src/boost/asio/basic_datagram_socket.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_datagram_socket.hpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,6 +19,7 @@
#include <cstddef>
#include <boost/asio/basic_socket.hpp>
#include <boost/asio/datagram_socket_service.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
@@ -42,8 +43,12 @@ class basic_datagram_socket
: public basic_socket<Protocol, DatagramSocketService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// socket.
+ typedef typename DatagramSocketService::native_handle_type native_type;
+
/// The native representation of a socket.
- typedef typename DatagramSocketService::native_type native_type;
+ typedef typename DatagramSocketService::native_handle_type native_handle_type;
/// The protocol type.
typedef Protocol protocol_type;
@@ -121,12 +126,48 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_datagram_socket(boost::asio::io_service& io_service,
- const protocol_type& protocol, const native_type& native_socket)
+ const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, DatagramSocketService>(
io_service, 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_service&) constructor.
+ */
+ basic_datagram_socket(basic_datagram_socket&& other)
+ : basic_socket<Protocol, DatagramSocketService>(
+ BOOST_ASIO_MOVE_CAST(basic_datagram_socket)(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_service&) constructor.
+ */
+ basic_datagram_socket& operator=(basic_datagram_socket&& other)
+ {
+ basic_socket<Protocol, DatagramSocketService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_datagram_socket)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Send some data on a connected socket.
/**
* This function is used to send data on the datagram socket. The function
@@ -153,8 +194,9 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -180,9 +222,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -207,7 +249,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.send(this->implementation, buffers, flags, ec);
+ return this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send on a connected socket.
@@ -247,9 +290,15 @@ public:
* std::vector.
*/
template <typename ConstBufferSequence, typename WriteHandler>
- void async_send(const ConstBufferSequence& buffers, WriteHandler handler)
+ void async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Start an asynchronous send on a connected socket.
@@ -283,9 +332,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, WriteHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Send a datagram to the specified endpoint.
@@ -318,9 +373,9 @@ public:
const endpoint_type& destination)
{
boost::system::error_code ec;
- std::size_t s = this->service.send_to(
- this->implementation, buffers, destination, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -345,9 +400,9 @@ public:
const endpoint_type& destination, socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.send_to(
- this->implementation, buffers, destination, flags, ec);
- boost::asio::detail::throw_error(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;
}
@@ -372,7 +427,7 @@ public:
const endpoint_type& destination, socket_base::message_flags flags,
boost::system::error_code& ec)
{
- return this->service.send_to(this->implementation,
+ return this->get_service().send_to(this->get_implementation(),
buffers, destination, flags, ec);
}
@@ -415,10 +470,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, WriteHandler handler)
+ const endpoint_type& destination,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send_to(this->implementation, buffers, destination, 0,
- 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;
+
+ this->get_service().async_send_to(this->get_implementation(), buffers,
+ destination, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Start an asynchronous send.
@@ -451,10 +511,14 @@ public:
template <typename ConstBufferSequence, typename WriteHandler>
void async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- WriteHandler handler)
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send_to(this->implementation, buffers, destination,
- flags, 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;
+
+ this->get_service().async_send_to(this->get_implementation(), buffers,
+ destination, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Receive some data on a connected socket.
@@ -485,9 +549,9 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(
- this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -514,9 +578,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -542,7 +606,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.receive(this->implementation, buffers, flags, ec);
+ return this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive on a connected socket.
@@ -582,9 +647,15 @@ public:
* std::vector.
*/
template <typename MutableBufferSequence, typename ReadHandler>
- void async_receive(const MutableBufferSequence& buffers, ReadHandler handler)
+ void async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Start an asynchronous receive on a connected socket.
@@ -617,9 +688,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, ReadHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Receive a datagram with the endpoint of the sender.
@@ -653,9 +730,9 @@ public:
endpoint_type& sender_endpoint)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive_from(
- this->implementation, buffers, sender_endpoint, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -680,9 +757,9 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive_from(
- this->implementation, buffers, sender_endpoint, flags, ec);
- boost::asio::detail::throw_error(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;
}
@@ -707,8 +784,8 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
boost::system::error_code& ec)
{
- return this->service.receive_from(this->implementation, buffers,
- sender_endpoint, flags, ec);
+ return this->get_service().receive_from(this->get_implementation(),
+ buffers, sender_endpoint, flags, ec);
}
/// Start an asynchronous receive.
@@ -749,10 +826,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, ReadHandler handler)
+ endpoint_type& sender_endpoint,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive_from(this->implementation, buffers,
- sender_endpoint, 0, 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;
+
+ this->get_service().async_receive_from(this->get_implementation(), buffers,
+ sender_endpoint, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Start an asynchronous receive.
@@ -787,10 +869,14 @@ public:
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ReadHandler handler)
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive_from(this->implementation, buffers,
- sender_endpoint, flags, 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;
+
+ this->get_service().async_receive_from(this->get_implementation(), buffers,
+ sender_endpoint, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_deadline_timer.hpp b/3rdParty/Boost/src/boost/asio/basic_deadline_timer.hpp
index 452999d..6baeb7a 100644
--- a/3rdParty/Boost/src/boost/asio/basic_deadline_timer.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_deadline_timer.hpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,6 +19,7 @@
#include <cstddef>
#include <boost/asio/basic_io_object.hpp>
#include <boost/asio/deadline_timer_service.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
@@ -161,7 +162,7 @@ public:
{
boost::system::error_code ec;
this->service.expires_at(this->implementation, expiry_time, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
}
/// Constructor to set a particular expiry time relative to now.
@@ -180,7 +181,7 @@ public:
{
boost::system::error_code ec;
this->service.expires_from_now(this->implementation, expiry_time, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
}
/// Cancel any asynchronous operations that are waiting on the timer.
@@ -209,7 +210,7 @@ public:
{
boost::system::error_code ec;
std::size_t s = this->service.cancel(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "cancel");
return s;
}
@@ -240,6 +241,67 @@ public:
return this->service.cancel(this->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->service.cancel_one(this->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->service.cancel_one(this->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.
@@ -277,7 +339,7 @@ public:
boost::system::error_code ec;
std::size_t s = this->service.expires_at(
this->implementation, expiry_time, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
return s;
}
@@ -346,7 +408,7 @@ public:
boost::system::error_code ec;
std::size_t s = this->service.expires_from_now(
this->implementation, expiry_time, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
return s;
}
@@ -390,7 +452,7 @@ public:
{
boost::system::error_code ec;
this->service.wait(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "wait");
}
/// Perform a blocking wait on the timer.
@@ -430,9 +492,14 @@ public:
* boost::asio::io_service::post().
*/
template <typename WaitHandler>
- void async_wait(WaitHandler handler)
+ void async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
{
- this->service.async_wait(this->implementation, 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;
+
+ this->service.async_wait(this->implementation,
+ BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_io_object.hpp b/3rdParty/Boost/src/boost/asio/basic_io_object.hpp
index 8e137e7..0464335 100644
--- a/3rdParty/Boost/src/boost/asio/basic_io_object.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_io_object.hpp
@@ -2,7 +2,7 @@
// basic_io_object.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,7 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -24,10 +23,42 @@
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 eval(T* t, U* u) -> decltype(t->move_construct(*u, *u), char());
+ static char (&eval(...))[2];
+
+ public:
+ static const bool value =
+ sizeof(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
- : private noncopyable
{
public:
/// The type of the service that will be used to provide I/O operations.
@@ -36,20 +67,6 @@ public:
/// The underlying implementation type of I/O object.
typedef typename service_type::implementation_type implementation_type;
- /// (Deprecated: use get_io_service().) Get the io_service associated with
- /// the object.
- /**
- * This function may be used to obtain the io_service object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_service object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_service& io_service()
- {
- return service.get_io_service();
- }
-
/// Get the io_service associated with the object.
/**
* This function may be used to obtain the io_service object that the I/O
@@ -67,7 +84,7 @@ protected:
/// Construct a basic_io_object.
/**
* Performs:
- * @code service.construct(implementation); @endcode
+ * @code get_service().construct(get_implementation()); @endcode
*/
explicit basic_io_object(boost::asio::io_service& io_service)
: service(boost::asio::use_service<IoObjectService>(io_service))
@@ -75,22 +92,147 @@ protected:
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);
+#endif // defined(GENERATING_DOCUMENTATION)
+
/// Protected destructor to prevent deletion through this type.
/**
* Performs:
- * @code service.destroy(implementation); @endcode
+ * @code get_service().destroy(get_implementation()); @endcode
*/
~basic_io_object()
{
service.destroy(implementation);
}
- /// The service associated with the I/O object.
+ /// 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;
+ }
+
+ /// (Deprecated: Use get_service().) The service associated with the I/O
+ /// object.
+ /**
+ * @note Available only for services that do not support movability.
+ */
service_type& service;
- /// The underlying implementation of the I/O object.
+ /// 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;
+ }
+
+ /// (Deprecated: Use get_implementation().) The underlying implementation of
+ /// the I/O object.
implementation_type implementation;
+
+private:
+ basic_io_object(const basic_io_object&);
+ basic_io_object& operator=(const basic_io_object&);
+};
+
+#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;
+
+ boost::asio::io_service& get_io_service()
+ {
+ return service_->get_io_service();
+ }
+
+protected:
+ explicit basic_io_object(boost::asio::io_service& io_service)
+ : service_(&boost::asio::use_service<IoObjectService>(io_service))
+ {
+ service_->construct(implementation);
+ }
+
+ basic_io_object(basic_io_object&& other)
+ : service_(&other.get_service())
+ {
+ service_->move_construct(implementation, 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;
+ }
+
+ implementation_type implementation;
+
+private:
+ basic_io_object(const basic_io_object&);
+ void operator=(const basic_io_object&);
+
+ IoObjectService* service_;
};
+#endif // defined(BOOST_ASIO_HAS_MOVE)
} // namespace asio
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/asio/basic_raw_socket.hpp b/3rdParty/Boost/src/boost/asio/basic_raw_socket.hpp
index 0e58e7f..90f66c0 100644
--- a/3rdParty/Boost/src/boost/asio/basic_raw_socket.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_raw_socket.hpp
@@ -2,7 +2,7 @@
// basic_raw_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
#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/raw_socket_service.hpp>
@@ -42,8 +43,12 @@ class basic_raw_socket
: public basic_socket<Protocol, RawSocketService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// socket.
+ typedef typename RawSocketService::native_handle_type native_type;
+
/// The native representation of a socket.
- typedef typename RawSocketService::native_type native_type;
+ typedef typename RawSocketService::native_handle_type native_handle_type;
/// The protocol type.
typedef Protocol protocol_type;
@@ -121,12 +126,47 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_raw_socket(boost::asio::io_service& io_service,
- const protocol_type& protocol, const native_type& native_socket)
+ const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, RawSocketService>(
io_service, 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_service&) constructor.
+ */
+ basic_raw_socket(basic_raw_socket&& other)
+ : basic_socket<Protocol, RawSocketService>(
+ BOOST_ASIO_MOVE_CAST(basic_raw_socket)(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_service&) constructor.
+ */
+ basic_raw_socket& operator=(basic_raw_socket&& other)
+ {
+ basic_socket<Protocol, RawSocketService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_raw_socket)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Send some data on a connected socket.
/**
* This function is used to send data on the raw socket. The function call
@@ -152,8 +192,9 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -178,9 +219,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -204,7 +245,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.send(this->implementation, buffers, flags, ec);
+ return this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send on a connected socket.
@@ -243,9 +285,15 @@ public:
* std::vector.
*/
template <typename ConstBufferSequence, typename WriteHandler>
- void async_send(const ConstBufferSequence& buffers, WriteHandler handler)
+ void async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Start an asynchronous send on a connected socket.
@@ -278,9 +326,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, WriteHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Send raw data to the specified endpoint.
@@ -313,9 +367,9 @@ public:
const endpoint_type& destination)
{
boost::system::error_code ec;
- std::size_t s = this->service.send_to(
- this->implementation, buffers, destination, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -340,9 +394,9 @@ public:
const endpoint_type& destination, socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.send_to(
- this->implementation, buffers, destination, flags, ec);
- boost::asio::detail::throw_error(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;
}
@@ -367,7 +421,7 @@ public:
const endpoint_type& destination, socket_base::message_flags flags,
boost::system::error_code& ec)
{
- return this->service.send_to(this->implementation,
+ return this->get_service().send_to(this->get_implementation(),
buffers, destination, flags, ec);
}
@@ -410,10 +464,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, WriteHandler handler)
+ const endpoint_type& destination,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send_to(this->implementation, buffers, destination, 0,
- 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;
+
+ this->get_service().async_send_to(this->get_implementation(), buffers,
+ destination, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Start an asynchronous send.
@@ -446,10 +505,14 @@ public:
template <typename ConstBufferSequence, typename WriteHandler>
void async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- WriteHandler handler)
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send_to(this->implementation, buffers, destination,
- flags, 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;
+
+ this->get_service().async_send_to(this->get_implementation(), buffers,
+ destination, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Receive some data on a connected socket.
@@ -480,9 +543,9 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(
- this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -509,9 +572,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -537,7 +600,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.receive(this->implementation, buffers, flags, ec);
+ return this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive on a connected socket.
@@ -577,9 +641,15 @@ public:
* std::vector.
*/
template <typename MutableBufferSequence, typename ReadHandler>
- void async_receive(const MutableBufferSequence& buffers, ReadHandler handler)
+ void async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Start an asynchronous receive on a connected socket.
@@ -612,9 +682,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, ReadHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Receive raw data with the endpoint of the sender.
@@ -648,9 +724,9 @@ public:
endpoint_type& sender_endpoint)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive_from(
- this->implementation, buffers, sender_endpoint, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -675,9 +751,9 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive_from(
- this->implementation, buffers, sender_endpoint, flags, ec);
- boost::asio::detail::throw_error(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;
}
@@ -702,8 +778,8 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
boost::system::error_code& ec)
{
- return this->service.receive_from(this->implementation, buffers,
- sender_endpoint, flags, ec);
+ return this->get_service().receive_from(this->get_implementation(),
+ buffers, sender_endpoint, flags, ec);
}
/// Start an asynchronous receive.
@@ -744,10 +820,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, ReadHandler handler)
+ endpoint_type& sender_endpoint,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive_from(this->implementation, buffers,
- sender_endpoint, 0, 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;
+
+ this->get_service().async_receive_from(this->get_implementation(), buffers,
+ sender_endpoint, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Start an asynchronous receive.
@@ -782,10 +863,14 @@ public:
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ReadHandler handler)
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive_from(this->implementation, buffers,
- sender_endpoint, flags, 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;
+
+ this->get_service().async_receive_from(this->get_implementation(), buffers,
+ sender_endpoint, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_seq_packet_socket.hpp b/3rdParty/Boost/src/boost/asio/basic_seq_packet_socket.hpp
new file mode 100644
index 0000000..a638c71
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/basic_seq_packet_socket.hpp
@@ -0,0 +1,514 @@
+//
+// basic_seq_packet_socket.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, 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/seq_packet_socket_service.hpp>
+
+#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,
+ typename SeqPacketSocketService = seq_packet_socket_service<Protocol> >
+class basic_seq_packet_socket
+ : public basic_socket<Protocol, SeqPacketSocketService>
+{
+public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// socket.
+ typedef typename SeqPacketSocketService::native_handle_type native_type;
+
+ /// The native representation of a socket.
+ typedef typename SeqPacketSocketService::native_handle_type
+ native_handle_type;
+
+ /// 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_service The io_service 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_service& io_service)
+ : basic_socket<Protocol, SeqPacketSocketService>(io_service)
+ {
+ }
+
+ /// 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_service The io_service 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_service& io_service,
+ const protocol_type& protocol)
+ : basic_socket<Protocol, SeqPacketSocketService>(io_service, 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_service The io_service 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_service& io_service,
+ const endpoint_type& endpoint)
+ : basic_socket<Protocol, SeqPacketSocketService>(io_service, 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_service The io_service 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_service& io_service,
+ const protocol_type& protocol, const native_handle_type& native_socket)
+ : basic_socket<Protocol, SeqPacketSocketService>(
+ io_service, 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_service&) constructor.
+ */
+ basic_seq_packet_socket(basic_seq_packet_socket&& other)
+ : basic_socket<Protocol, SeqPacketSocketService>(
+ BOOST_ASIO_MOVE_CAST(basic_seq_packet_socket)(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_service&) constructor.
+ */
+ basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
+ {
+ basic_socket<Protocol, SeqPacketSocketService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_seq_packet_socket)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// 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_service::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>
+ void 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+ }
+
+ /// 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->get_service().receive(
+ this->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->get_service().receive(
+ this->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->get_service().receive(this->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. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_service::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>
+ void 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;
+
+ this->get_service().async_receive(this->get_implementation(), buffers,
+ 0, out_flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+ }
+
+ /// 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_service::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>
+ void 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;
+
+ this->get_service().async_receive(this->get_implementation(), buffers,
+ in_flags, out_flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
diff --git a/3rdParty/Boost/src/boost/asio/basic_serial_port.hpp b/3rdParty/Boost/src/boost/asio/basic_serial_port.hpp
index 744fd3b..31ee955 100644
--- a/3rdParty/Boost/src/boost/asio/basic_serial_port.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_serial_port.hpp
@@ -2,7 +2,7 @@
// basic_serial_port.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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
@@ -23,6 +23,7 @@
#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>
@@ -48,8 +49,12 @@ class basic_serial_port
public serial_port_base
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// serial port.
+ typedef typename SerialPortService::native_handle_type native_type;
+
/// The native representation of a serial port.
- typedef typename SerialPortService::native_type native_type;
+ 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;
@@ -82,8 +87,8 @@ public:
: basic_io_object<SerialPortService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, device, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().open(this->get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
}
/// Construct and open a basic_serial_port.
@@ -102,8 +107,8 @@ public:
: basic_io_object<SerialPortService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, device, ec);
- boost::asio::detail::throw_error(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.
@@ -119,13 +124,49 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_serial_port(boost::asio::io_service& io_service,
- const native_type& native_serial_port)
+ const native_handle_type& native_serial_port)
: basic_io_object<SerialPortService>(io_service)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, native_serial_port, ec);
- boost::asio::detail::throw_error(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_service&) 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_service&) 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.
/**
@@ -166,8 +207,8 @@ public:
void open(const std::string& device)
{
boost::system::error_code ec;
- this->service.open(this->implementation, device, ec);
- boost::asio::detail::throw_error(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.
@@ -182,7 +223,7 @@ public:
boost::system::error_code open(const std::string& device,
boost::system::error_code& ec)
{
- return this->service.open(this->implementation, device, ec);
+ return this->get_service().open(this->get_implementation(), device, ec);
}
/// Assign an existing native serial port to the serial port.
@@ -193,11 +234,12 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
- void assign(const native_type& native_serial_port)
+ void assign(const native_handle_type& native_serial_port)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, native_serial_port, ec);
- boost::asio::detail::throw_error(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.
@@ -208,16 +250,17 @@ public:
*
* @param ec Set to indicate what error occurred, if any.
*/
- boost::system::error_code assign(const native_type& native_serial_port,
+ boost::system::error_code assign(const native_handle_type& native_serial_port,
boost::system::error_code& ec)
{
- return this->service.assign(this->implementation, native_serial_port, ec);
+ return this->get_service().assign(this->get_implementation(),
+ native_serial_port, ec);
}
/// Determine whether the serial port is open.
bool is_open() const
{
- return this->service.is_open(this->implementation);
+ return this->get_service().is_open(this->get_implementation());
}
/// Close the serial port.
@@ -231,8 +274,8 @@ public:
void close()
{
boost::system::error_code ec;
- this->service.close(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().close(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
}
/// Close the serial port.
@@ -245,10 +288,11 @@ public:
*/
boost::system::error_code close(boost::system::error_code& ec)
{
- return this->service.close(this->implementation, ec);
+ return this->get_service().close(this->get_implementation(), ec);
}
- /// Get the native serial port representation.
+ /// (Deprecated: Use native_handle().) 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
@@ -256,7 +300,18 @@ public:
*/
native_type native()
{
- return this->service.native(this->implementation);
+ return this->get_service().native_handle(this->get_implementation());
+ }
+
+ /// 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.
@@ -270,8 +325,8 @@ public:
void cancel()
{
boost::system::error_code ec;
- this->service.cancel(this->implementation, ec);
- boost::asio::detail::throw_error(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.
@@ -284,7 +339,7 @@ public:
*/
boost::system::error_code cancel(boost::system::error_code& ec)
{
- return this->service.cancel(this->implementation, ec);
+ return this->get_service().cancel(this->get_implementation(), ec);
}
/// Send a break sequence to the serial port.
@@ -297,8 +352,8 @@ public:
void send_break()
{
boost::system::error_code ec;
- this->service.send_break(this->implementation, ec);
- boost::asio::detail::throw_error(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.
@@ -310,7 +365,7 @@ public:
*/
boost::system::error_code send_break(boost::system::error_code& ec)
{
- return this->service.send_break(this->implementation, ec);
+ return this->get_service().send_break(this->get_implementation(), ec);
}
/// Set an option on the serial port.
@@ -332,8 +387,8 @@ public:
void set_option(const SettableSerialPortOption& option)
{
boost::system::error_code ec;
- this->service.set_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -355,7 +410,8 @@ public:
boost::system::error_code set_option(const SettableSerialPortOption& option,
boost::system::error_code& ec)
{
- return this->service.set_option(this->implementation, option, ec);
+ return this->get_service().set_option(
+ this->get_implementation(), option, ec);
}
/// Get an option from the serial port.
@@ -378,8 +434,8 @@ public:
void get_option(GettableSerialPortOption& option)
{
boost::system::error_code ec;
- this->service.get_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -402,7 +458,8 @@ public:
boost::system::error_code get_option(GettableSerialPortOption& option,
boost::system::error_code& ec)
{
- return this->service.get_option(this->implementation, option, ec);
+ return this->get_service().get_option(
+ this->get_implementation(), option, ec);
}
/// Write some data to the serial port.
@@ -436,8 +493,9 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.write_some(this->implementation, buffers, ec);
- boost::asio::detail::throw_error(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;
}
@@ -461,7 +519,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.write_some(this->implementation, buffers, ec);
+ return this->get_service().write_some(
+ this->get_implementation(), buffers, ec);
}
/// Start an asynchronous write.
@@ -501,9 +560,14 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_write_some(const ConstBufferSequence& buffers,
- WriteHandler handler)
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_write_some(this->implementation, buffers, 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;
+
+ this->get_service().async_write_some(this->get_implementation(),
+ buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the serial port.
@@ -538,8 +602,9 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.read_some(this->implementation, buffers, ec);
- boost::asio::detail::throw_error(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;
}
@@ -564,7 +629,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.read_some(this->implementation, buffers, ec);
+ return this->get_service().read_some(
+ this->get_implementation(), buffers, ec);
}
/// Start an asynchronous read.
@@ -605,9 +671,14 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_read_some(const MutableBufferSequence& buffers,
- ReadHandler handler)
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_read_some(this->implementation, buffers, 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;
+
+ this->get_service().async_read_some(this->get_implementation(),
+ buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_signal_set.hpp b/3rdParty/Boost/src/boost/asio/basic_signal_set.hpp
new file mode 100644
index 0000000..ddbef87
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/basic_signal_set.hpp
@@ -0,0 +1,384 @@
+//
+// basic_signal_set.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, 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/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_service, 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_service The io_service 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_service& io_service)
+ : basic_io_object<SignalSetService>(io_service)
+ {
+ }
+
+ /// Construct a signal set and add one signal.
+ /**
+ * This constructor creates a signal set and registers for one signal.
+ *
+ * @param io_service The io_service 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_service);
+ * signals.add(signal_number_1); @endcode
+ */
+ basic_signal_set(boost::asio::io_service& io_service, int signal_number_1)
+ : basic_io_object<SignalSetService>(io_service)
+ {
+ boost::system::error_code ec;
+ this->service.add(this->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_service The io_service 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_service);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2); @endcode
+ */
+ basic_signal_set(boost::asio::io_service& io_service, int signal_number_1,
+ int signal_number_2)
+ : basic_io_object<SignalSetService>(io_service)
+ {
+ boost::system::error_code ec;
+ this->service.add(this->implementation, signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ this->service.add(this->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_service The io_service 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_service);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2);
+ * signals.add(signal_number_3); @endcode
+ */
+ basic_signal_set(boost::asio::io_service& io_service, int signal_number_1,
+ int signal_number_2, int signal_number_3)
+ : basic_io_object<SignalSetService>(io_service)
+ {
+ boost::system::error_code ec;
+ this->service.add(this->implementation, signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ this->service.add(this->implementation, signal_number_2, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ this->service.add(this->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->service.add(this->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::system::error_code add(int signal_number,
+ boost::system::error_code& ec)
+ {
+ return this->service.add(this->implementation, signal_number, 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->service.remove(this->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::system::error_code remove(int signal_number,
+ boost::system::error_code& ec)
+ {
+ return this->service.remove(this->implementation, signal_number, 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->service.clear(this->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::system::error_code clear(boost::system::error_code& ec)
+ {
+ return this->service.clear(this->implementation, 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->service.cancel(this->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::system::error_code cancel(boost::system::error_code& ec)
+ {
+ return this->service.cancel(this->implementation, 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_service::post().
+ */
+ template <typename SignalHandler>
+ void 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;
+
+ this->service.async_wait(this->implementation,
+ BOOST_ASIO_MOVE_CAST(SignalHandler)(handler));
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/3rdParty/Boost/src/boost/asio/basic_socket.hpp b/3rdParty/Boost/src/boost/asio/basic_socket.hpp
index 11ce5c9..c9e2045 100644
--- a/3rdParty/Boost/src/boost/asio/basic_socket.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_socket.hpp
@@ -2,7 +2,7 @@
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,7 @@
#include <boost/asio/detail/config.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/socket_base.hpp>
@@ -41,8 +42,12 @@ class basic_socket
public socket_base
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// socket.
+ typedef typename SocketService::native_handle_type native_type;
+
/// The native representation of a socket.
- typedef typename SocketService::native_type native_type;
+ typedef typename SocketService::native_handle_type native_handle_type;
/// The protocol type.
typedef Protocol protocol_type;
@@ -81,8 +86,8 @@ public:
: basic_io_object<SocketService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, protocol, ec);
- boost::asio::detail::throw_error(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
@@ -105,10 +110,11 @@ public:
: basic_io_object<SocketService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, endpoint.protocol(), ec);
- boost::asio::detail::throw_error(ec);
- this->service.bind(this->implementation, endpoint, ec);
- boost::asio::detail::throw_error(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.
@@ -125,14 +131,50 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_socket(boost::asio::io_service& io_service,
- const protocol_type& protocol, const native_type& native_socket)
+ const protocol_type& protocol, const native_handle_type& native_socket)
: basic_io_object<SocketService>(io_service)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, protocol, native_socket, ec);
- boost::asio::detail::throw_error(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_service&) constructor.
+ */
+ basic_socket(basic_socket&& other)
+ : basic_io_object<SocketService>(
+ BOOST_ASIO_MOVE_CAST(basic_socket)(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_service&) constructor.
+ */
+ basic_socket& operator=(basic_socket&& other)
+ {
+ basic_io_object<SocketService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_socket)(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
@@ -178,8 +220,8 @@ public:
void open(const protocol_type& protocol = protocol_type())
{
boost::system::error_code ec;
- this->service.open(this->implementation, protocol, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().open(this->get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
}
/// Open the socket using the specified protocol.
@@ -204,7 +246,7 @@ public:
boost::system::error_code open(const protocol_type& protocol,
boost::system::error_code& ec)
{
- return this->service.open(this->implementation, protocol, ec);
+ return this->get_service().open(this->get_implementation(), protocol, ec);
}
/// Assign an existing native socket to the socket.
@@ -217,11 +259,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
- void assign(const protocol_type& protocol, const native_type& native_socket)
+ void assign(const protocol_type& protocol,
+ const native_handle_type& native_socket)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, protocol, native_socket, ec);
- boost::asio::detail::throw_error(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.
@@ -235,16 +279,16 @@ public:
* @param ec Set to indicate what error occurred, if any.
*/
boost::system::error_code assign(const protocol_type& protocol,
- const native_type& native_socket, boost::system::error_code& ec)
+ const native_handle_type& native_socket, boost::system::error_code& ec)
{
- return this->service.assign(this->implementation,
+ return this->get_service().assign(this->get_implementation(),
protocol, native_socket, ec);
}
/// Determine whether the socket is open.
bool is_open() const
{
- return this->service.is_open(this->implementation);
+ return this->get_service().is_open(this->get_implementation());
}
/// Close the socket.
@@ -253,7 +297,8 @@ public:
* 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.
+ * @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.
@@ -261,8 +306,8 @@ public:
void close()
{
boost::system::error_code ec;
- this->service.close(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().close(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
}
/// Close the socket.
@@ -271,7 +316,8 @@ public:
* 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.
+ * @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
@@ -290,10 +336,10 @@ public:
*/
boost::system::error_code close(boost::system::error_code& ec)
{
- return this->service.close(this->implementation, ec);
+ return this->get_service().close(this->get_implementation(), ec);
}
- /// Get the native socket representation.
+ /// (Deprecated: Use native_handle().) 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
@@ -301,7 +347,18 @@ public:
*/
native_type native()
{
- return this->service.native(this->implementation);
+ return this->get_service().native_handle(this->get_implementation());
+ }
+
+ /// 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.
@@ -348,8 +405,8 @@ public:
void cancel()
{
boost::system::error_code ec;
- this->service.cancel(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().cancel(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
}
/// Cancel all asynchronous operations associated with the socket.
@@ -395,7 +452,7 @@ public:
#endif
boost::system::error_code cancel(boost::system::error_code& ec)
{
- return this->service.cancel(this->implementation, ec);
+ return this->get_service().cancel(this->get_implementation(), ec);
}
/// Determine whether the socket is at the out-of-band data mark.
@@ -411,8 +468,8 @@ public:
bool at_mark() const
{
boost::system::error_code ec;
- bool b = this->service.at_mark(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ bool b = this->get_service().at_mark(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "at_mark");
return b;
}
@@ -428,7 +485,7 @@ public:
*/
bool at_mark(boost::system::error_code& ec) const
{
- return this->service.at_mark(this->implementation, ec);
+ return this->get_service().at_mark(this->get_implementation(), ec);
}
/// Determine the number of bytes available for reading.
@@ -444,8 +501,9 @@ public:
std::size_t available() const
{
boost::system::error_code ec;
- std::size_t s = this->service.available(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().available(
+ this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "available");
return s;
}
@@ -461,7 +519,7 @@ public:
*/
std::size_t available(boost::system::error_code& ec) const
{
- return this->service.available(this->implementation, ec);
+ return this->get_service().available(this->get_implementation(), ec);
}
/// Bind the socket to the given local endpoint.
@@ -485,8 +543,8 @@ public:
void bind(const endpoint_type& endpoint)
{
boost::system::error_code ec;
- this->service.bind(this->implementation, endpoint, ec);
- boost::asio::detail::throw_error(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.
@@ -515,7 +573,7 @@ public:
boost::system::error_code bind(const endpoint_type& endpoint,
boost::system::error_code& ec)
{
- return this->service.bind(this->implementation, endpoint, ec);
+ return this->get_service().bind(this->get_implementation(), endpoint, ec);
}
/// Connect the socket to the specified endpoint.
@@ -546,11 +604,12 @@ public:
boost::system::error_code ec;
if (!is_open())
{
- this->service.open(this->implementation, peer_endpoint.protocol(), ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().open(this->get_implementation(),
+ peer_endpoint.protocol(), ec);
+ boost::asio::detail::throw_error(ec, "connect");
}
- this->service.connect(this->implementation, peer_endpoint, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "connect");
}
/// Connect the socket to the specified endpoint.
@@ -586,14 +645,15 @@ public:
{
if (!is_open())
{
- if (this->service.open(this->implementation,
+ if (this->get_service().open(this->get_implementation(),
peer_endpoint.protocol(), ec))
{
return ec;
}
}
- return this->service.connect(this->implementation, peer_endpoint, ec);
+ return this->get_service().connect(
+ this->get_implementation(), peer_endpoint, ec);
}
/// Start an asynchronous connect.
@@ -638,21 +698,28 @@ public:
* @endcode
*/
template <typename ConnectHandler>
- void async_connect(const endpoint_type& peer_endpoint, ConnectHandler handler)
+ void 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;
- if (this->service.open(this->implementation,
- peer_endpoint.protocol(), ec))
+ const protocol_type protocol = peer_endpoint.protocol();
+ if (this->get_service().open(this->get_implementation(), protocol, ec))
{
this->get_io_service().post(
- boost::asio::detail::bind_handler(handler, ec));
+ boost::asio::detail::bind_handler(
+ BOOST_ASIO_MOVE_CAST(ConnectHandler)(handler), ec));
return;
}
}
- this->service.async_connect(this->implementation, peer_endpoint, handler);
+ this->get_service().async_connect(this->get_implementation(),
+ peer_endpoint, BOOST_ASIO_MOVE_CAST(ConnectHandler)(handler));
}
/// Set an option on the socket.
@@ -693,8 +760,8 @@ public:
void set_option(const SettableSocketOption& option)
{
boost::system::error_code ec;
- this->service.set_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -740,7 +807,8 @@ public:
boost::system::error_code set_option(const SettableSocketOption& option,
boost::system::error_code& ec)
{
- return this->service.set_option(this->implementation, option, ec);
+ return this->get_service().set_option(
+ this->get_implementation(), option, ec);
}
/// Get an option from the socket.
@@ -782,8 +850,8 @@ public:
void get_option(GettableSocketOption& option) const
{
boost::system::error_code ec;
- this->service.get_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -830,7 +898,8 @@ public:
boost::system::error_code get_option(GettableSocketOption& option,
boost::system::error_code& ec) const
{
- return this->service.get_option(this->implementation, option, ec);
+ return this->get_service().get_option(
+ this->get_implementation(), option, ec);
}
/// Perform an IO control command on the socket.
@@ -859,8 +928,8 @@ public:
void io_control(IoControlCommand& command)
{
boost::system::error_code ec;
- this->service.io_control(this->implementation, command, ec);
- boost::asio::detail::throw_error(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.
@@ -894,7 +963,338 @@ public:
boost::system::error_code io_control(IoControlCommand& command,
boost::system::error_code& ec)
{
- return this->service.io_control(this->implementation, command, ec);
+ return this->get_service().io_control(
+ this->get_implementation(), command, 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::system::error_code non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ return this->get_service().non_blocking(
+ this->get_implementation(), mode, 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_write_some(boost::asio::null_buffers(), *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_write_some(boost::asio::null_buffers(), 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_write_some(boost::asio::null_buffers(), *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_write_some(boost::asio::null_buffers(), 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_write_some(boost::asio::null_buffers(), *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_write_some(boost::asio::null_buffers(), op);
+ * } @endcode
+ */
+ boost::system::error_code native_non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ return this->get_service().native_non_blocking(
+ this->get_implementation(), mode, ec);
}
/// Get the local endpoint of the socket.
@@ -915,8 +1315,9 @@ public:
endpoint_type local_endpoint() const
{
boost::system::error_code ec;
- endpoint_type ep = this->service.local_endpoint(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ endpoint_type ep = this->get_service().local_endpoint(
+ this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "local_endpoint");
return ep;
}
@@ -943,7 +1344,7 @@ public:
*/
endpoint_type local_endpoint(boost::system::error_code& ec) const
{
- return this->service.local_endpoint(this->implementation, ec);
+ return this->get_service().local_endpoint(this->get_implementation(), ec);
}
/// Get the remote endpoint of the socket.
@@ -964,8 +1365,9 @@ public:
endpoint_type remote_endpoint() const
{
boost::system::error_code ec;
- endpoint_type ep = this->service.remote_endpoint(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ endpoint_type ep = this->get_service().remote_endpoint(
+ this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "remote_endpoint");
return ep;
}
@@ -992,7 +1394,7 @@ public:
*/
endpoint_type remote_endpoint(boost::system::error_code& ec) const
{
- return this->service.remote_endpoint(this->implementation, ec);
+ return this->get_service().remote_endpoint(this->get_implementation(), ec);
}
/// Disable sends or receives on the socket.
@@ -1015,8 +1417,8 @@ public:
void shutdown(shutdown_type what)
{
boost::system::error_code ec;
- this->service.shutdown(this->implementation, what, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().shutdown(this->get_implementation(), what, ec);
+ boost::asio::detail::throw_error(ec, "shutdown");
}
/// Disable sends or receives on the socket.
@@ -1044,7 +1446,7 @@ public:
boost::system::error_code shutdown(shutdown_type what,
boost::system::error_code& ec)
{
- return this->service.shutdown(this->implementation, what, ec);
+ return this->get_service().shutdown(this->get_implementation(), what, ec);
}
protected:
diff --git a/3rdParty/Boost/src/boost/asio/basic_socket_acceptor.hpp b/3rdParty/Boost/src/boost/asio/basic_socket_acceptor.hpp
index a877bc3..5a3b0f7 100644
--- a/3rdParty/Boost/src/boost/asio/basic_socket_acceptor.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_socket_acceptor.hpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
#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/error.hpp>
#include <boost/asio/socket_acceptor_service.hpp>
@@ -55,8 +56,12 @@ class basic_socket_acceptor
public socket_base
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of an
+ /// acceptor.
+ typedef typename SocketAcceptorService::native_handle_type native_type;
+
/// The native representation of an acceptor.
- typedef typename SocketAcceptorService::native_type native_type;
+ typedef typename SocketAcceptorService::native_handle_type native_handle_type;
/// The protocol type.
typedef Protocol protocol_type;
@@ -96,8 +101,8 @@ public:
: basic_io_object<SocketAcceptorService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, protocol, ec);
- boost::asio::detail::throw_error(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.
@@ -132,19 +137,20 @@ public:
: basic_io_object<SocketAcceptorService>(io_service)
{
boost::system::error_code ec;
- this->service.open(this->implementation, endpoint.protocol(), ec);
- boost::asio::detail::throw_error(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->service.set_option(this->implementation,
+ this->get_service().set_option(this->get_implementation(),
socket_base::reuse_address(true), ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "set_option");
}
- this->service.bind(this->implementation, endpoint, ec);
- boost::asio::detail::throw_error(ec);
- this->service.listen(this->implementation,
+ 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_connections, ec);
- boost::asio::detail::throw_error(ec);
+ boost::asio::detail::throw_error(ec, "listen");
}
/// Construct a basic_socket_acceptor on an existing native acceptor.
@@ -163,14 +169,50 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_socket_acceptor(boost::asio::io_service& io_service,
- const protocol_type& protocol, const native_type& native_acceptor)
+ const protocol_type& protocol, const native_handle_type& native_acceptor)
: basic_io_object<SocketAcceptorService>(io_service)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, protocol, native_acceptor, ec);
- boost::asio::detail::throw_error(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_service&) constructor.
+ */
+ basic_socket_acceptor(basic_socket_acceptor&& other)
+ : basic_io_object<SocketAcceptorService>(
+ BOOST_ASIO_MOVE_CAST(basic_socket_acceptor)(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_service&) constructor.
+ */
+ basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
+ {
+ basic_io_object<SocketAcceptorService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_socket_acceptor)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Open the acceptor using the specified protocol.
/**
* This function opens the socket acceptor so that it will use the specified
@@ -189,8 +231,8 @@ public:
void open(const protocol_type& protocol = protocol_type())
{
boost::system::error_code ec;
- this->service.open(this->implementation, protocol, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().open(this->get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
}
/// Open the acceptor using the specified protocol.
@@ -216,7 +258,7 @@ public:
boost::system::error_code open(const protocol_type& protocol,
boost::system::error_code& ec)
{
- return this->service.open(this->implementation, protocol, ec);
+ return this->get_service().open(this->get_implementation(), protocol, ec);
}
/// Assigns an existing native acceptor to the acceptor.
@@ -229,11 +271,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
- void assign(const protocol_type& protocol, const native_type& native_acceptor)
+ void assign(const protocol_type& protocol,
+ const native_handle_type& native_acceptor)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, protocol, native_acceptor, ec);
- boost::asio::detail::throw_error(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.
@@ -247,16 +291,16 @@ public:
* @param ec Set to indicate what error occurred, if any.
*/
boost::system::error_code assign(const protocol_type& protocol,
- const native_type& native_acceptor, boost::system::error_code& ec)
+ const native_handle_type& native_acceptor, boost::system::error_code& ec)
{
- return this->service.assign(this->implementation,
+ return this->get_service().assign(this->get_implementation(),
protocol, native_acceptor, ec);
}
/// Determine whether the acceptor is open.
bool is_open() const
{
- return this->service.is_open(this->implementation);
+ return this->get_service().is_open(this->get_implementation());
}
/// Bind the acceptor to the given local endpoint.
@@ -279,8 +323,8 @@ public:
void bind(const endpoint_type& endpoint)
{
boost::system::error_code ec;
- this->service.bind(this->implementation, endpoint, ec);
- boost::asio::detail::throw_error(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.
@@ -308,7 +352,7 @@ public:
boost::system::error_code bind(const endpoint_type& endpoint,
boost::system::error_code& ec)
{
- return this->service.bind(this->implementation, endpoint, ec);
+ return this->get_service().bind(this->get_implementation(), endpoint, ec);
}
/// Place the acceptor into the state where it will listen for new
@@ -324,8 +368,8 @@ public:
void listen(int backlog = socket_base::max_connections)
{
boost::system::error_code ec;
- this->service.listen(this->implementation, backlog, ec);
- boost::asio::detail::throw_error(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
@@ -352,7 +396,7 @@ public:
*/
boost::system::error_code listen(int backlog, boost::system::error_code& ec)
{
- return this->service.listen(this->implementation, backlog, ec);
+ return this->get_service().listen(this->get_implementation(), backlog, ec);
}
/// Close the acceptor.
@@ -368,8 +412,8 @@ public:
void close()
{
boost::system::error_code ec;
- this->service.close(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().close(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
}
/// Close the acceptor.
@@ -396,10 +440,10 @@ public:
*/
boost::system::error_code close(boost::system::error_code& ec)
{
- return this->service.close(this->implementation, ec);
+ return this->get_service().close(this->get_implementation(), ec);
}
- /// Get the native acceptor representation.
+ /// (Deprecated: Use native_handle().) 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
@@ -407,7 +451,18 @@ public:
*/
native_type native()
{
- return this->service.native(this->implementation);
+ return this->get_service().native_handle(this->get_implementation());
+ }
+
+ /// 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.
@@ -421,8 +476,8 @@ public:
void cancel()
{
boost::system::error_code ec;
- this->service.cancel(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().cancel(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
}
/// Cancel all asynchronous operations associated with the acceptor.
@@ -435,7 +490,7 @@ public:
*/
boost::system::error_code cancel(boost::system::error_code& ec)
{
- return this->service.cancel(this->implementation, ec);
+ return this->get_service().cancel(this->get_implementation(), ec);
}
/// Set an option on the acceptor.
@@ -463,8 +518,8 @@ public:
void set_option(const SettableSocketOption& option)
{
boost::system::error_code ec;
- this->service.set_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -497,7 +552,8 @@ public:
boost::system::error_code set_option(const SettableSocketOption& option,
boost::system::error_code& ec)
{
- return this->service.set_option(this->implementation, option, ec);
+ return this->get_service().set_option(
+ this->get_implementation(), option, ec);
}
/// Get an option from the acceptor.
@@ -526,8 +582,8 @@ public:
void get_option(GettableSocketOption& option)
{
boost::system::error_code ec;
- this->service.get_option(this->implementation, option, ec);
- boost::asio::detail::throw_error(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.
@@ -561,7 +617,189 @@ public:
boost::system::error_code get_option(GettableSocketOption& option,
boost::system::error_code& ec)
{
- return this->service.get_option(this->implementation, option, ec);
+ return this->get_service().get_option(
+ this->get_implementation(), option, 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_service);
+ * ...
+ * 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_service);
+ * ...
+ * 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::system::error_code io_control(IoControlCommand& command,
+ boost::system::error_code& ec)
+ {
+ return this->get_service().io_control(
+ this->get_implementation(), command, 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::system::error_code non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ return this->get_service().non_blocking(
+ this->get_implementation(), mode, 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::system::error_code native_non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ return this->get_service().native_non_blocking(
+ this->get_implementation(), mode, ec);
}
/// Get the local endpoint of the acceptor.
@@ -582,8 +820,9 @@ public:
endpoint_type local_endpoint() const
{
boost::system::error_code ec;
- endpoint_type ep = this->service.local_endpoint(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ endpoint_type ep = this->get_service().local_endpoint(
+ this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "local_endpoint");
return ep;
}
@@ -611,7 +850,7 @@ public:
*/
endpoint_type local_endpoint(boost::system::error_code& ec) const
{
- return this->service.local_endpoint(this->implementation, ec);
+ return this->get_service().local_endpoint(this->get_implementation(), ec);
}
/// Accept a new connection.
@@ -636,8 +875,8 @@ public:
void accept(basic_socket<protocol_type, SocketService>& peer)
{
boost::system::error_code ec;
- this->service.accept(this->implementation, peer, 0, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().accept(this->get_implementation(), peer, 0, ec);
+ boost::asio::detail::throw_error(ec, "accept");
}
/// Accept a new connection.
@@ -668,7 +907,7 @@ public:
basic_socket<protocol_type, SocketService>& peer,
boost::system::error_code& ec)
{
- return this->service.accept(this->implementation, peer, 0, ec);
+ return this->get_service().accept(this->get_implementation(), peer, 0, ec);
}
/// Start an asynchronous accept.
@@ -711,9 +950,14 @@ public:
*/
template <typename SocketService, typename AcceptHandler>
void async_accept(basic_socket<protocol_type, SocketService>& peer,
- AcceptHandler handler)
+ BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
{
- this->service.async_accept(this->implementation, peer, 0, handler);
+ // 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;
+
+ this->get_service().async_accept(this->get_implementation(),
+ peer, 0, BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler));
}
/// Accept a new connection and obtain the endpoint of the peer
@@ -744,8 +988,9 @@ public:
endpoint_type& peer_endpoint)
{
boost::system::error_code ec;
- this->service.accept(this->implementation, peer, &peer_endpoint, ec);
- boost::asio::detail::throw_error(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
@@ -781,7 +1026,8 @@ public:
basic_socket<protocol_type, SocketService>& peer,
endpoint_type& peer_endpoint, boost::system::error_code& ec)
{
- return this->service.accept(this->implementation, peer, &peer_endpoint, ec);
+ return this->get_service().accept(
+ this->get_implementation(), peer, &peer_endpoint, ec);
}
/// Start an asynchronous accept.
@@ -812,10 +1058,14 @@ public:
*/
template <typename SocketService, typename AcceptHandler>
void async_accept(basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint, AcceptHandler handler)
+ endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
{
- this->service.async_accept(this->implementation,
- peer, &peer_endpoint, handler);
+ // 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;
+
+ this->get_service().async_accept(this->get_implementation(), peer,
+ &peer_endpoint, BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_socket_iostream.hpp b/3rdParty/Boost/src/boost/asio/basic_socket_iostream.hpp
index 142f404..6fae085 100644
--- a/3rdParty/Boost/src/boost/asio/basic_socket_iostream.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_socket_iostream.hpp
@@ -2,7 +2,7 @@
// basic_socket_iostream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,36 +19,41 @@
#if !defined(BOOST_NO_IOSTREAM)
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/utility/base_from_member.hpp>
#include <boost/asio/basic_socket_streambuf.hpp>
#include <boost/asio/stream_socket_service.hpp>
-#if !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
-#define BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY 5
-#endif // !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+# if !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
+# define BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY 5
+# endif // !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY)
// A macro that should expand to:
// template <typename T1, ..., typename Tn>
// explicit basic_socket_iostream(T1 x1, ..., Tn xn)
// : basic_iostream<char>(&this->boost::base_from_member<
-// basic_socket_streambuf<Protocol, StreamSocketService> >::member)
+// basic_socket_streambuf<Protocol, StreamSocketService,
+// Time, TimeTraits, TimerService> >::member)
// {
// 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(z, n, data) \
+# define BOOST_ASIO_PRIVATE_CTR_DEF(z, n, data) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
explicit basic_socket_iostream(BOOST_PP_ENUM_BINARY_PARAMS(n, T, x)) \
: std::basic_iostream<char>(&this->boost::base_from_member< \
- basic_socket_streambuf<Protocol, StreamSocketService> >::member) \
+ basic_socket_streambuf<Protocol, StreamSocketService, \
+ Time, TimeTraits, TimerService> >::member) \
{ \
- tie(this); \
+ this->setf(std::ios_base::unitbuf); \
if (rdbuf()->connect(BOOST_PP_ENUM_PARAMS(n, x)) == 0) \
this->setstate(std::ios_base::failbit); \
} \
@@ -63,7 +68,7 @@
// }
// This macro should only persist within this file.
-#define BOOST_ASIO_PRIVATE_CONNECT_DEF(z, n, data) \
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF(z, n, data) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
void connect(BOOST_PP_ENUM_BINARY_PARAMS(n, T, x)) \
{ \
@@ -72,6 +77,8 @@
} \
/**/
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
#include <boost/asio/detail/push_options.hpp>
namespace boost {
@@ -79,19 +86,33 @@ namespace asio {
/// Iostream interface for a socket.
template <typename Protocol,
- typename StreamSocketService = stream_socket_service<Protocol> >
+ typename StreamSocketService = stream_socket_service<Protocol>,
+ typename Time = boost::posix_time::ptime,
+ typename TimeTraits = boost::asio::time_traits<Time>,
+ typename TimerService = deadline_timer_service<Time, TimeTraits> >
class basic_socket_iostream
: public boost::base_from_member<
- basic_socket_streambuf<Protocol, StreamSocketService> >,
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService> >,
public std::basic_iostream<char>
{
public:
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// The time type.
+ typedef typename TimeTraits::time_type time_type;
+
+ /// The duration type.
+ typedef typename TimeTraits::duration_type duration_type;
+
/// Construct a basic_socket_iostream without establishing a connection.
basic_socket_iostream()
: std::basic_iostream<char>(&this->boost::base_from_member<
- basic_socket_streambuf<Protocol, StreamSocketService> >::member)
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService> >::member)
{
- tie(this);
+ this->setf(std::ios_base::unitbuf);
}
#if defined(GENERATING_DOCUMENTATION)
@@ -103,6 +124,17 @@ public:
*/
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->boost::base_from_member<
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService> >::member)
+ {
+ this->setf(std::ios_base::unitbuf);
+ if (rdbuf()->connect(x...) == 0)
+ this->setstate(std::ios_base::failbit);
+ }
#else
BOOST_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY),
@@ -118,6 +150,13 @@ public:
*/
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_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY),
@@ -132,11 +171,77 @@ public:
}
/// Return a pointer to the underlying streambuf.
- basic_socket_streambuf<Protocol, StreamSocketService>* rdbuf() const
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>* rdbuf() const
{
- return const_cast<basic_socket_streambuf<Protocol, StreamSocketService>*>(
+ return const_cast<basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>*>(
&this->boost::base_from_member<
- basic_socket_streambuf<Protocol, StreamSocketService> >::member);
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService> >::member);
+ }
+
+ /// 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()->puberror();
+ }
+
+ /// Get the stream's expiry time as an absolute time.
+ /**
+ * @return An absolute time value representing the stream's expiry time.
+ */
+ time_type expires_at() const
+ {
+ return rdbuf()->expires_at();
+ }
+
+ /// 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_type& expiry_time)
+ {
+ rdbuf()->expires_at(expiry_time);
+ }
+
+ /// Get the timer's expiry time relative to now.
+ /**
+ * @return A relative time value representing the stream's expiry time.
+ */
+ duration_type expires_from_now() const
+ {
+ return rdbuf()->expires_from_now();
+ }
+
+ /// 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_type& expiry_time)
+ {
+ rdbuf()->expires_from_now(expiry_time);
}
};
@@ -145,8 +250,10 @@ public:
#include <boost/asio/detail/pop_options.hpp>
-#undef BOOST_ASIO_PRIVATE_CTR_DEF
-#undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#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_NO_IOSTREAM)
diff --git a/3rdParty/Boost/src/boost/asio/basic_socket_streambuf.hpp b/3rdParty/Boost/src/boost/asio/basic_socket_streambuf.hpp
index c2a9a99..fb047c6 100644
--- a/3rdParty/Boost/src/boost/asio/basic_socket_streambuf.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_socket_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_socket_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,53 +20,64 @@
#if !defined(BOOST_NO_IOSTREAM)
#include <streambuf>
-#include <boost/array.hpp>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/utility/base_from_member.hpp>
#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/deadline_timer_service.hpp>
+#include <boost/asio/detail/array.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/stream_socket_service.hpp>
+#include <boost/asio/time_traits.hpp>
-#if !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
-#define BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY 5
-#endif // !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
+#include <boost/asio/detail/push_options.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/asio/detail/pop_options.hpp>
+
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+# if !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
+# define BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY 5
+# endif // !defined(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY)
// A macro that should expand to:
// template <typename T1, ..., typename Tn>
-// basic_socket_streambuf<Protocol, StreamSocketService>* connect(
+// basic_socket_streambuf<Protocol, StreamSocketService,
+// Time, TimeTraits, TimerService>* connect(
// T1 x1, ..., Tn xn)
// {
// init_buffers();
-// boost::system::error_code ec;
-// this->basic_socket<Protocol, StreamSocketService>::close(ec);
+// this->basic_socket<Protocol, StreamSocketService>::close(ec_);
// typedef typename Protocol::resolver resolver_type;
// typedef typename resolver_type::query resolver_query;
// resolver_query query(x1, ..., xn);
-// resolve_and_connect(query, ec);
-// return !ec ? this : 0;
+// resolve_and_connect(query);
+// return !ec_ ? this : 0;
// }
// This macro should only persist within this file.
-#define BOOST_ASIO_PRIVATE_CONNECT_DEF( z, n, data ) \
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF( z, n, data ) \
template <BOOST_PP_ENUM_PARAMS(n, typename T)> \
- basic_socket_streambuf<Protocol, StreamSocketService>* connect( \
+ basic_socket_streambuf<Protocol, StreamSocketService, \
+ Time, TimeTraits, TimerService>* connect( \
BOOST_PP_ENUM_BINARY_PARAMS(n, T, x)) \
{ \
init_buffers(); \
- boost::system::error_code ec; \
- this->basic_socket<Protocol, StreamSocketService>::close(ec); \
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_); \
typedef typename Protocol::resolver resolver_type; \
typedef typename resolver_type::query resolver_query; \
resolver_query query(BOOST_PP_ENUM_PARAMS(n, x)); \
- resolve_and_connect(query, ec); \
- return !ec ? this : 0; \
+ resolve_and_connect(query); \
+ return !ec_ ? this : 0; \
} \
/**/
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
#include <boost/asio/detail/push_options.hpp>
namespace boost {
@@ -74,7 +85,10 @@ namespace asio {
/// Iostream streambuf for a socket.
template <typename Protocol,
- typename StreamSocketService = stream_socket_service<Protocol> >
+ typename StreamSocketService = stream_socket_service<Protocol>,
+ typename Time = boost::posix_time::ptime,
+ typename TimeTraits = boost::asio::time_traits<Time>,
+ typename TimerService = deadline_timer_service<Time, TimeTraits> >
class basic_socket_streambuf
: public std::streambuf,
private boost::base_from_member<io_service>,
@@ -84,11 +98,19 @@ public:
/// The endpoint type.
typedef typename Protocol::endpoint endpoint_type;
+ /// The time type.
+ typedef typename TimeTraits::time_type time_type;
+
+ /// The duration type.
+ typedef typename TimeTraits::duration_type duration_type;
+
/// Construct a basic_socket_streambuf without establishing a connection.
basic_socket_streambuf()
: basic_socket<Protocol, StreamSocketService>(
boost::base_from_member<boost::asio::io_service>::member),
- unbuffered_(false)
+ unbuffered_(false),
+ timer_service_(0),
+ timer_state_(no_timer)
{
init_buffers();
}
@@ -98,6 +120,8 @@ public:
{
if (pptr() != pbase())
overflow(traits_type::eof());
+
+ destroy_timer();
}
/// Establish a connection.
@@ -107,14 +131,30 @@ public:
* @return \c this if a connection was successfully established, a null
* pointer otherwise.
*/
- basic_socket_streambuf<Protocol, StreamSocketService>* connect(
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>* connect(
const endpoint_type& endpoint)
{
init_buffers();
- boost::system::error_code ec;
- this->basic_socket<Protocol, StreamSocketService>::close(ec);
- this->basic_socket<Protocol, StreamSocketService>::connect(endpoint, ec);
- return !ec ? this : 0;
+
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+
+ if (timer_state_ == timer_has_expired)
+ {
+ ec_ = boost::asio::error::operation_aborted;
+ return 0;
+ }
+
+ io_handler handler = { this };
+ this->basic_socket<Protocol, StreamSocketService>::async_connect(
+ endpoint, handler);
+
+ ec_ = boost::asio::error::would_block;
+ this->get_service().get_io_service().reset();
+ do this->get_service().get_io_service().run_one();
+ while (ec_ == boost::asio::error::would_block);
+
+ return !ec_ ? this : 0;
}
#if defined(GENERATING_DOCUMENTATION)
@@ -130,6 +170,19 @@ public:
template <typename T1, ..., typename TN>
basic_socket_streambuf<Protocol, StreamSocketService>* connect(
T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>* connect(T... x)
+ {
+ init_buffers();
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+ typedef typename Protocol::resolver resolver_type;
+ typedef typename resolver_type::query resolver_query;
+ resolver_query query(x...);
+ resolve_and_connect(query);
+ return !ec_ ? this : 0;
+ }
#else
BOOST_PP_REPEAT_FROM_TO(
1, BOOST_PP_INC(BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY),
@@ -141,14 +194,85 @@ public:
* @return \c this if a connection was successfully established, a null
* pointer otherwise.
*/
- basic_socket_streambuf<Protocol, StreamSocketService>* close()
+ basic_socket_streambuf<Protocol, StreamSocketService,
+ Time, TimeTraits, TimerService>* close()
{
- boost::system::error_code ec;
sync();
- this->basic_socket<Protocol, StreamSocketService>::close(ec);
- if (!ec)
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+ if (!ec_)
init_buffers();
- return !ec ? this : 0;
+ return !ec_ ? this : 0;
+ }
+
+ /// 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();
+ }
+
+ /// Get the stream buffer's expiry time as an absolute time.
+ /**
+ * @return An absolute time value representing the stream buffer's expiry
+ * time.
+ */
+ time_type expires_at() const
+ {
+ return timer_service_
+ ? timer_service_->expires_at(timer_implementation_)
+ : time_type();
+ }
+
+ /// 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_type& expiry_time)
+ {
+ construct_timer();
+
+ boost::system::error_code ec;
+ timer_service_->expires_at(timer_implementation_, expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+
+ start_timer();
+ }
+
+ /// Get the stream buffer's expiry time relative to now.
+ /**
+ * @return A relative time value representing the stream buffer's expiry time.
+ */
+ duration_type expires_from_now() const
+ {
+ return TimeTraits::subtract(expires_at(), TimeTraits::now());
+ }
+
+ /// 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_type& expiry_time)
+ {
+ construct_timer();
+
+ boost::system::error_code ec;
+ timer_service_->expires_from_now(timer_implementation_, expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+
+ start_timer();
}
protected:
@@ -156,15 +280,26 @@ protected:
{
if (gptr() == egptr())
{
- boost::system::error_code ec;
- std::size_t bytes_transferred = this->service.receive(
- this->implementation,
+ if (timer_state_ == timer_has_expired)
+ {
+ ec_ = boost::asio::error::operation_aborted;
+ return traits_type::eof();
+ }
+
+ io_handler handler = { this };
+ this->get_service().async_receive(this->get_implementation(),
boost::asio::buffer(boost::asio::buffer(get_buffer_) + putback_max),
- 0, ec);
- if (ec)
+ 0, handler);
+
+ ec_ = boost::asio::error::would_block;
+ this->get_service().get_io_service().reset();
+ do this->get_service().get_io_service().run_one();
+ while (ec_ == boost::asio::error::would_block);
+ if (ec_)
return traits_type::eof();
- setg(get_buffer_.begin(), get_buffer_.begin() + putback_max,
- get_buffer_.begin() + putback_max + bytes_transferred);
+
+ setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max + bytes_transferred_);
return traits_type::to_int_type(*gptr());
}
else
@@ -184,13 +319,25 @@ protected:
}
else
{
+ if (timer_state_ == timer_has_expired)
+ {
+ ec_ = boost::asio::error::operation_aborted;
+ return traits_type::eof();
+ }
+
// Send the single character immediately.
- boost::system::error_code ec;
char_type ch = traits_type::to_char_type(c);
- this->service.send(this->implementation,
- boost::asio::buffer(&ch, sizeof(char_type)), 0, ec);
- if (ec)
+ io_handler handler = { this };
+ this->get_service().async_send(this->get_implementation(),
+ boost::asio::buffer(&ch, sizeof(char_type)), 0, handler);
+
+ ec_ = boost::asio::error::would_block;
+ this->get_service().get_io_service().reset();
+ do this->get_service().get_io_service().run_one();
+ while (ec_ == boost::asio::error::would_block);
+ if (ec_)
return traits_type::eof();
+
return c;
}
}
@@ -201,15 +348,26 @@ protected:
boost::asio::buffer(pbase(), pptr() - pbase());
while (boost::asio::buffer_size(buffer) > 0)
{
- boost::system::error_code ec;
- std::size_t bytes_transferred = this->service.send(
- this->implementation, boost::asio::buffer(buffer),
- 0, ec);
- if (ec)
+ if (timer_state_ == timer_has_expired)
+ {
+ ec_ = boost::asio::error::operation_aborted;
+ return traits_type::eof();
+ }
+
+ io_handler handler = { this };
+ this->get_service().async_send(this->get_implementation(),
+ boost::asio::buffer(buffer), 0, handler);
+
+ ec_ = boost::asio::error::would_block;
+ this->get_service().get_io_service().reset();
+ do this->get_service().get_io_service().run_one();
+ while (ec_ == boost::asio::error::would_block);
+ if (ec_)
return traits_type::eof();
- buffer = buffer + bytes_transferred;
+
+ buffer = buffer + bytes_transferred_;
}
- setp(put_buffer_.begin(), put_buffer_.end());
+ 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()))
@@ -239,45 +397,141 @@ protected:
return 0;
}
+ /// Get the last error associated with the stream buffer.
+ /**
+ * @return An \c error_code corresponding to the last error from the stream
+ * buffer.
+ */
+ virtual const boost::system::error_code& error() const
+ {
+ return ec_;
+ }
+
private:
void init_buffers()
{
- setg(get_buffer_.begin(),
- get_buffer_.begin() + putback_max,
- get_buffer_.begin() + putback_max);
+ setg(&get_buffer_[0],
+ &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max);
if (unbuffered_)
setp(0, 0);
else
- setp(put_buffer_.begin(), put_buffer_.end());
+ setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
}
template <typename ResolverQuery>
- void resolve_and_connect(const ResolverQuery& query,
- boost::system::error_code& ec)
+ void resolve_and_connect(const ResolverQuery& query)
{
typedef typename Protocol::resolver resolver_type;
typedef typename resolver_type::iterator iterator_type;
resolver_type resolver(
boost::base_from_member<boost::asio::io_service>::member);
- iterator_type i = resolver.resolve(query, ec);
- if (!ec)
+ iterator_type i = resolver.resolve(query, ec_);
+ if (!ec_)
{
iterator_type end;
- ec = boost::asio::error::host_not_found;
- while (ec && i != end)
+ ec_ = boost::asio::error::host_not_found;
+ while (ec_ && i != end)
{
- this->basic_socket<Protocol, StreamSocketService>::close();
- this->basic_socket<Protocol, StreamSocketService>::connect(*i, ec);
+ this->basic_socket<Protocol, StreamSocketService>::close(ec_);
+
+ if (timer_state_ == timer_has_expired)
+ {
+ ec_ = boost::asio::error::operation_aborted;
+ return;
+ }
+
+ io_handler handler = { this };
+ this->basic_socket<Protocol, StreamSocketService>::async_connect(
+ *i, handler);
+
+ ec_ = boost::asio::error::would_block;
+ this->get_service().get_io_service().reset();
+ do this->get_service().get_io_service().run_one();
+ while (ec_ == boost::asio::error::would_block);
+
++i;
}
}
}
+ struct io_handler;
+ friend struct io_handler;
+ struct io_handler
+ {
+ basic_socket_streambuf* this_;
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred = 0)
+ {
+ this_->ec_ = ec;
+ this_->bytes_transferred_ = bytes_transferred;
+ }
+ };
+
+ struct timer_handler;
+ friend struct timer_handler;
+ struct timer_handler
+ {
+ basic_socket_streambuf* this_;
+
+ void operator()(const boost::system::error_code&)
+ {
+ time_type now = TimeTraits::now();
+
+ time_type expiry_time = this_->timer_service_->expires_at(
+ this_->timer_implementation_);
+
+ if (TimeTraits::less_than(now, expiry_time))
+ {
+ this_->timer_state_ = timer_is_pending;
+ this_->timer_service_->async_wait(this_->timer_implementation_, *this);
+ }
+ else
+ {
+ this_->timer_state_ = timer_has_expired;
+ boost::system::error_code ec;
+ this_->basic_socket<Protocol, StreamSocketService>::close(ec);
+ }
+ }
+ };
+
+ void construct_timer()
+ {
+ if (timer_service_ == 0)
+ {
+ TimerService& timer_service = use_service<TimerService>(
+ boost::base_from_member<boost::asio::io_service>::member);
+ timer_service.construct(timer_implementation_);
+ timer_service_ = &timer_service;
+ }
+ }
+
+ void destroy_timer()
+ {
+ if (timer_service_)
+ timer_service_->destroy(timer_implementation_);
+ }
+
+ void start_timer()
+ {
+ if (timer_state_ != timer_is_pending)
+ {
+ timer_handler handler = { this };
+ handler(boost::system::error_code());
+ }
+ }
+
enum { putback_max = 8 };
enum { buffer_size = 512 };
- boost::array<char, buffer_size> get_buffer_;
- boost::array<char, buffer_size> put_buffer_;
+ boost::asio::detail::array<char, buffer_size> get_buffer_;
+ boost::asio::detail::array<char, buffer_size> put_buffer_;
bool unbuffered_;
+ boost::system::error_code ec_;
+ std::size_t bytes_transferred_;
+ TimerService* timer_service_;
+ typename TimerService::implementation_type timer_implementation_;
+ enum state { no_timer, timer_is_pending, timer_has_expired } timer_state_;
};
} // namespace asio
@@ -285,7 +539,9 @@ private:
#include <boost/asio/detail/pop_options.hpp>
-#undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(BOOST_NO_IOSTREAM)
diff --git a/3rdParty/Boost/src/boost/asio/basic_stream_socket.hpp b/3rdParty/Boost/src/boost/asio/basic_stream_socket.hpp
index 87bd035..010f0aa 100644
--- a/3rdParty/Boost/src/boost/asio/basic_stream_socket.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_stream_socket.hpp
@@ -2,7 +2,7 @@
// basic_stream_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,6 +18,7 @@
#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/stream_socket_service.hpp>
@@ -45,8 +46,12 @@ class basic_stream_socket
: public basic_socket<Protocol, StreamSocketService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// socket.
+ typedef typename StreamSocketService::native_handle_type native_type;
+
/// The native representation of a socket.
- typedef typename StreamSocketService::native_type native_type;
+ typedef typename StreamSocketService::native_handle_type native_handle_type;
/// The protocol type.
typedef Protocol protocol_type;
@@ -122,12 +127,47 @@ public:
* @throws boost::system::system_error Thrown on failure.
*/
basic_stream_socket(boost::asio::io_service& io_service,
- const protocol_type& protocol, const native_type& native_socket)
+ const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, StreamSocketService>(
io_service, 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_service&) constructor.
+ */
+ basic_stream_socket(basic_stream_socket&& other)
+ : basic_socket<Protocol, StreamSocketService>(
+ BOOST_ASIO_MOVE_CAST(basic_stream_socket)(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_service&) constructor.
+ */
+ basic_stream_socket& operator=(basic_stream_socket&& other)
+ {
+ basic_socket<Protocol, StreamSocketService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_stream_socket)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Send some data on the socket.
/**
* This function is used to send data on the stream socket. The function
@@ -157,9 +197,9 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(
- this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -195,9 +235,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
return s;
}
@@ -223,7 +263,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.send(this->implementation, buffers, flags, ec);
+ return this->get_service().send(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send.
@@ -262,9 +303,15 @@ public:
* std::vector.
*/
template <typename ConstBufferSequence, typename WriteHandler>
- void async_send(const ConstBufferSequence& buffers, WriteHandler handler)
+ void async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_send(this->get_implementation(), buffers, 0,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Start an asynchronous send.
@@ -306,9 +353,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, WriteHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_send(this->get_implementation(), buffers, flags,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Receive some data on the socket.
@@ -343,8 +396,9 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -383,9 +437,9 @@ public:
socket_base::message_flags flags)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(
- this->implementation, buffers, flags, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
return s;
}
@@ -411,7 +465,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, boost::system::error_code& ec)
{
- return this->service.receive(this->implementation, buffers, flags, ec);
+ return this->get_service().receive(
+ this->get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive.
@@ -452,9 +507,15 @@ public:
* std::vector.
*/
template <typename MutableBufferSequence, typename ReadHandler>
- void async_receive(const MutableBufferSequence& buffers, ReadHandler handler)
+ void async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Start an asynchronous receive.
@@ -498,9 +559,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, ReadHandler handler)
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, flags, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
/// Write some data to the socket.
@@ -534,8 +601,9 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.send(this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -559,7 +627,7 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.send(this->implementation, buffers, 0, ec);
+ return this->get_service().send(this->get_implementation(), buffers, 0, ec);
}
/// Start an asynchronous write.
@@ -599,9 +667,14 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_write_some(const ConstBufferSequence& buffers,
- WriteHandler handler)
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_send(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_send(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the socket.
@@ -636,8 +709,9 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.receive(this->implementation, buffers, 0, ec);
- boost::asio::detail::throw_error(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;
}
@@ -662,7 +736,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.receive(this->implementation, buffers, 0, ec);
+ return this->get_service().receive(
+ this->get_implementation(), buffers, 0, ec);
}
/// Start an asynchronous read.
@@ -703,9 +778,14 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_read_some(const MutableBufferSequence& buffers,
- ReadHandler handler)
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_receive(this->implementation, buffers, 0, 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;
+
+ this->get_service().async_receive(this->get_implementation(),
+ buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/basic_streambuf.hpp b/3rdParty/Boost/src/boost/asio/basic_streambuf.hpp
index 7a04c69..e77624b 100644
--- a/3rdParty/Boost/src/boost/asio/basic_streambuf.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -130,9 +130,9 @@ public:
* of the streambuf's input sequence is 0.
*/
explicit basic_streambuf(
- std::size_t max_size = (std::numeric_limits<std::size_t>::max)(),
+ std::size_t maximum_size = (std::numeric_limits<std::size_t>::max)(),
const Allocator& allocator = Allocator())
- : max_size_(max_size),
+ : max_size_(maximum_size),
buffer_(allocator)
{
std::size_t pend = (std::min<std::size_t>)(max_size_, buffer_delta);
diff --git a/3rdParty/Boost/src/boost/asio/basic_streambuf_fwd.hpp b/3rdParty/Boost/src/boost/asio/basic_streambuf_fwd.hpp
index a7d82d3..ca806ea 100644
--- a/3rdParty/Boost/src/boost/asio/basic_streambuf_fwd.hpp
+++ b/3rdParty/Boost/src/boost/asio/basic_streambuf_fwd.hpp
@@ -2,7 +2,7 @@
// basic_streambuf_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/3rdParty/Boost/src/boost/asio/basic_waitable_timer.hpp b/3rdParty/Boost/src/boost/asio/basic_waitable_timer.hpp
new file mode 100644
index 0000000..d957bde
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/basic_waitable_timer.hpp
@@ -0,0 +1,518 @@
+//
+// basic_waitable_timer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, 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>
+#include <boost/asio/waitable_timer_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// 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 the boost::asio::waitable_timer typedef.
+ *
+ * @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:
+ * @code
+ * // Construct a timer without setting an expiry time.
+ * boost::asio::waitable_timer timer(io_service);
+ *
+ * // 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::waitable_timer timer(io_service,
+ * 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 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_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_waitable_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 Clock,
+ typename WaitTraits = boost::asio::wait_traits<Clock>,
+ typename WaitableTimerService = waitable_timer_service<Clock, WaitTraits> >
+class basic_waitable_timer
+ : public basic_io_object<WaitableTimerService>
+{
+public:
+ /// 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_from_now() functions must be called to set an
+ * expiry time before the timer can be waited on.
+ *
+ * @param io_service The io_service object that the timer will use to dispatch
+ * handlers for any asynchronous operations performed on the timer.
+ */
+ explicit basic_waitable_timer(boost::asio::io_service& io_service)
+ : basic_io_object<WaitableTimerService>(io_service)
+ {
+ }
+
+ /// Constructor to set a particular expiry time as an absolute time.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param io_service The io_service 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_service& io_service,
+ const time_point& expiry_time)
+ : basic_io_object<WaitableTimerService>(io_service)
+ {
+ boost::system::error_code ec;
+ this->service.expires_at(this->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_service The io_service 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_service& io_service,
+ const duration& expiry_time)
+ : basic_io_object<WaitableTimerService>(io_service)
+ {
+ boost::system::error_code ec;
+ this->service.expires_from_now(this->implementation, expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+ }
+
+ /// 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->service.cancel(this->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->service.cancel(this->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->service.cancel_one(this->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->service.cancel_one(this->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_point expires_at() const
+ {
+ return this->service.expires_at(this->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->service.expires_at(
+ this->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_point& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return this->service.expires_at(this->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 expires_from_now() const
+ {
+ return this->service.expires_from_now(this->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& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->service.expires_from_now(
+ this->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& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return this->service.expires_from_now(
+ this->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->service.wait(this->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->service.wait(this->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_service::post().
+ */
+ template <typename WaitHandler>
+ void 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;
+
+ this->service.async_wait(this->implementation,
+ BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_WAITABLE_TIMER_HPP
diff --git a/3rdParty/Boost/src/boost/asio/buffer.hpp b/3rdParty/Boost/src/boost/asio/buffer.hpp
index 15eaad4..532cfd1 100644
--- a/3rdParty/Boost/src/boost/asio/buffer.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffer.hpp
@@ -2,7 +2,7 @@
// buffer.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,6 +17,7 @@
#include <boost/asio/detail/config.hpp>
#include <cstddef>
+#include <cstring>
#include <string>
#include <vector>
#include <boost/detail/workaround.hpp>
@@ -68,6 +69,19 @@ std::size_t buffer_size_helper(const const_buffer&);
* 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 @ref buffer_size
+ * and @ref buffer_cast functions:
+ *
+ * @code boost::asio::mutable_buffer b1 = ...;
+ * std::size_t s1 = boost::asio::buffer_size(b1);
+ * unsigned char* p1 = boost::asio::buffer_cast<unsigned char*>(b1);
+ * @endcode
+ *
+ * The boost::asio::buffer_cast function permits violations of type safety, so
+ * uses of it in application code should be carefully considered.
*/
class mutable_buffer
{
@@ -133,59 +147,6 @@ inline std::size_t buffer_size_helper(const mutable_buffer& b)
} // namespace detail
-/// Cast a non-modifiable buffer to a specified pointer to POD type.
-/**
- * @relates mutable_buffer
- */
-template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const mutable_buffer& b)
-{
- return static_cast<PointerToPodType>(detail::buffer_cast_helper(b));
-}
-
-/// Get the number of bytes in a non-modifiable buffer.
-/**
- * @relates mutable_buffer
- */
-inline std::size_t buffer_size(const mutable_buffer& b)
-{
- return detail::buffer_size_helper(b);
-}
-
-/// 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 start)
-{
- if (start > buffer_size(b))
- return mutable_buffer();
- char* new_data = buffer_cast<char*>(b) + start;
- std::size_t new_size = buffer_size(b) - start;
- 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 start, const mutable_buffer& b)
-{
- if (start > buffer_size(b))
- return mutable_buffer();
- char* new_data = buffer_cast<char*>(b) + start;
- std::size_t new_size = buffer_size(b) - start;
- return mutable_buffer(new_data, new_size
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
/// Adapts a single modifiable buffer so that it meets the requirements of the
/// MutableBufferSequence concept.
class mutable_buffers_1
@@ -228,6 +189,19 @@ public:
* 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 @ref buffer_size
+ * and @ref buffer_cast functions:
+ *
+ * @code boost::asio::const_buffer b1 = ...;
+ * std::size_t s1 = boost::asio::buffer_size(b1);
+ * const unsigned char* p1 = boost::asio::buffer_cast<const unsigned char*>(b1);
+ * @endcode
+ *
+ * The boost::asio::buffer_cast function permits violations of type safety, so
+ * uses of it in application code should be carefully considered.
*/
class const_buffer
{
@@ -303,59 +277,6 @@ inline std::size_t buffer_size_helper(const const_buffer& b)
} // namespace detail
-/// Cast a non-modifiable buffer to a specified pointer to POD type.
-/**
- * @relates const_buffer
- */
-template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const const_buffer& b)
-{
- return static_cast<PointerToPodType>(detail::buffer_cast_helper(b));
-}
-
-/// Get the number of bytes in a non-modifiable buffer.
-/**
- * @relates const_buffer
- */
-inline std::size_t buffer_size(const const_buffer& b)
-{
- return detail::buffer_size_helper(b);
-}
-
-/// 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 start)
-{
- if (start > buffer_size(b))
- return const_buffer();
- const char* new_data = buffer_cast<const char*>(b) + start;
- std::size_t new_size = buffer_size(b) - start;
- 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 start, const const_buffer& b)
-{
- if (start > buffer_size(b))
- return const_buffer();
- const char* new_data = buffer_cast<const char*>(b) + start;
- std::size_t new_size = buffer_size(b) - start;
- return const_buffer(new_data, new_size
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
/// Adapts a single non-modifiable buffer so that it meets the requirements of
/// the ConstBufferSequence concept.
class const_buffers_1
@@ -420,6 +341,163 @@ private:
mutable_buffer buf_;
};
+/** @defgroup buffer_size boost::asio::buffer_size
+ *
+ * @brief The boost::asio::buffer_size function determines the total number of
+ * bytes in a buffer or buffer sequence.
+ */
+/*@{*/
+
+/// Get the number of bytes in a modifiable buffer.
+inline std::size_t buffer_size(const mutable_buffer& b)
+{
+ return detail::buffer_size_helper(b);
+}
+
+/// Get the number of bytes in a modifiable buffer.
+inline std::size_t buffer_size(const mutable_buffers_1& b)
+{
+ return detail::buffer_size_helper(b);
+}
+
+/// Get the number of bytes in a non-modifiable buffer.
+inline std::size_t buffer_size(const const_buffer& b)
+{
+ return detail::buffer_size_helper(b);
+}
+
+/// Get the number of bytes in a non-modifiable buffer.
+inline std::size_t buffer_size(const const_buffers_1& b)
+{
+ return detail::buffer_size_helper(b);
+}
+
+/// Get the total number of bytes in a buffer sequence.
+/**
+ * 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)
+{
+ std::size_t total_buffer_size = 0;
+
+ typename BufferSequence::const_iterator iter = b.begin();
+ typename BufferSequence::const_iterator end = b.end();
+ for (; iter != end; ++iter)
+ total_buffer_size += detail::buffer_size_helper(*iter);
+
+ return total_buffer_size;
+}
+
+/*@}*/
+
+/** @defgroup buffer_cast boost::asio::buffer_cast
+ *
+ * @brief 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)
+{
+ return static_cast<PointerToPodType>(detail::buffer_cast_helper(b));
+}
+
+/// Cast a non-modifiable buffer to a specified pointer to POD type.
+template <typename PointerToPodType>
+inline PointerToPodType buffer_cast(const const_buffer& b)
+{
+ return static_cast<PointerToPodType>(detail::buffer_cast_helper(b));
+}
+
+/*@}*/
+
+/// 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 start)
+{
+ if (start > buffer_size(b))
+ return mutable_buffer();
+ char* new_data = buffer_cast<char*>(b) + start;
+ std::size_t new_size = buffer_size(b) - start;
+ 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 start, const mutable_buffer& b)
+{
+ if (start > buffer_size(b))
+ return mutable_buffer();
+ char* new_data = buffer_cast<char*>(b) + start;
+ std::size_t new_size = buffer_size(b) - start;
+ 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 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 start)
+{
+ if (start > buffer_size(b))
+ return const_buffer();
+ const char* new_data = buffer_cast<const char*>(b) + start;
+ std::size_t new_size = buffer_size(b) - start;
+ 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 start, const const_buffer& b)
+{
+ if (start > buffer_size(b))
+ return const_buffer();
+ const char* new_data = buffer_cast<const char*>(b) + start;
+ std::size_t new_size = buffer_size(b) - start;
+ return const_buffer(new_data, new_size
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , b.get_debug_check()
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
namespace detail {
@@ -479,9 +557,9 @@ private:
* 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 or
- * boost::array of POD elements. This helps prevent buffer overruns by
- * automatically determining the size of the buffer:
+ * 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));
@@ -489,8 +567,11 @@ private:
* std::vector<char> d2(128);
* bytes_transferred = sock.receive(boost::asio::buffer(d2));
*
- * boost::array<char, 128> d3;
- * bytes_transferred = sock.receive(boost::asio::buffer(d3)); @endcode
+ * 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
@@ -499,8 +580,8 @@ private:
*
* @par Accessing Buffer Contents
*
- * The contents of a buffer may be accessed using the boost::asio::buffer_size
- * and boost::asio::buffer_cast functions:
+ * The contents of a buffer may be accessed using the @ref buffer_size and
+ * @ref buffer_cast functions:
*
* @code boost::asio::mutable_buffer b1 = ...;
* std::size_t s1 = boost::asio::buffer_size(b1);
@@ -513,6 +594,24 @@ private:
* The boost::asio::buffer_cast function permits violations of type safety, so
* uses of it in application code should be carefully considered.
*
+ * For convenience, the @ref buffer_size function also works on 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, 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
+ *
* @par Buffer Invalidation
*
* A buffer object does not have any ownership of the memory it refers to. It
@@ -526,8 +625,8 @@ private:
* 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::string, the buffer objects returned are invalidated according to the
- * rules defined for invalidation of references, pointers and iterators
+ * 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
@@ -896,6 +995,103 @@ inline const_buffers_1 buffer(const boost::array<PodType, N>& data,
? 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_buffers_1 value equivalent to:
+ * @code mutable_buffers_1(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline mutable_buffers_1 buffer(std::array<PodType, N>& data)
+{
+ return mutable_buffers_1(
+ mutable_buffer(data.data(), data.size() * sizeof(PodType)));
+}
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffers_1 value equivalent to:
+ * @code mutable_buffers_1(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline mutable_buffers_1 buffer(std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes)
+{
+ return mutable_buffers_1(
+ 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_buffers_1 value equivalent to:
+ * @code const_buffers_1(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline const_buffers_1 buffer(std::array<const PodType, N>& data)
+{
+ return const_buffers_1(
+ const_buffer(data.data(), data.size() * sizeof(PodType)));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffers_1 value equivalent to:
+ * @code const_buffers_1(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline const_buffers_1 buffer(std::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes)
+{
+ return const_buffers_1(
+ 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_buffers_1 value equivalent to:
+ * @code const_buffers_1(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline const_buffers_1 buffer(const std::array<PodType, N>& data)
+{
+ return const_buffers_1(
+ const_buffer(data.data(), data.size() * sizeof(PodType)));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffers_1 value equivalent to:
+ * @code const_buffers_1(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline const_buffers_1 buffer(const std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes)
+{
+ return const_buffers_1(
+ 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_buffers_1 value equivalent to:
@@ -997,16 +1193,20 @@ inline const_buffers_1 buffer(
/// Create a new non-modifiable buffer that represents the given string.
/**
- * @returns <tt>const_buffers_1(data.data(), data.size())</tt>.
+ * @returns <tt>const_buffers_1(data.data(), data.size() * sizeof(Elem))</tt>.
*
* @note The buffer is invalidated by any non-const operation called on the
* given string object.
*/
-inline const_buffers_1 buffer(const std::string& data)
+template <typename Elem, typename Traits, typename Allocator>
+inline const_buffers_1 buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data)
{
- return const_buffers_1(const_buffer(data.data(), data.size()
+ return const_buffers_1(const_buffer(data.data(), data.size() * sizeof(Elem)
#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<std::string::const_iterator>(data.begin())
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+ >(data.begin())
#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
));
}
@@ -1016,26 +1216,924 @@ inline const_buffers_1 buffer(const std::string& data)
* @returns A const_buffers_1 value equivalent to:
* @code const_buffers_1(
* data.data(),
- * min(data.size(), max_size_in_bytes)); @endcode
+ * 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.
*/
-inline const_buffers_1 buffer(const std::string& data,
+template <typename Elem, typename Traits, typename Allocator>
+inline const_buffers_1 buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data,
std::size_t max_size_in_bytes)
{
return const_buffers_1(
const_buffer(data.data(),
- data.size() < max_size_in_bytes
- ? data.size() : max_size_in_bytes
+ 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<std::string::const_iterator>(data.begin())
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+ >(data.begin())
#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
));
}
/*@}*/
+/** @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.
+ */
+/*@{*/
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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)
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const const_buffer& source)
+{
+ using namespace std; // For memcpy.
+ std::size_t target_size = buffer_size(target);
+ std::size_t source_size = buffer_size(source);
+ std::size_t n = target_size < source_size ? target_size : source_size;
+ memcpy(buffer_cast<void*>(target), buffer_cast<const void*>(source), n);
+ return n;
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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)
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const const_buffers_1& source)
+{
+ return buffer_copy(target, static_cast<const const_buffer&>(source));
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const mutable_buffer& source)
+{
+ return buffer_copy(target, const_buffer(source));
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const mutable_buffers_1& source)
+{
+ return buffer_copy(target, const_buffer(source));
+}
+
+/// Copies bytes from a source buffer sequence to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region 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)
+ */
+template <typename ConstBufferSequence>
+std::size_t buffer_copy(const mutable_buffer& target,
+ const ConstBufferSequence& source)
+{
+ std::size_t total_bytes_copied = 0;
+
+ typename ConstBufferSequence::const_iterator source_iter = source.begin();
+ typename ConstBufferSequence::const_iterator source_end = source.end();
+
+ for (mutable_buffer target_buffer(target);
+ buffer_size(target_buffer) && source_iter != source_end; ++source_iter)
+ {
+ const_buffer source_buffer(*source_iter);
+ std::size_t bytes_copied = buffer_copy(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+ target_buffer = target_buffer + bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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)
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const const_buffer& source)
+{
+ return buffer_copy(static_cast<const mutable_buffer&>(target), source);
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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)
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const const_buffers_1& source)
+{
+ return buffer_copy(static_cast<const mutable_buffer&>(target),
+ static_cast<const const_buffer&>(source));
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const mutable_buffer& source)
+{
+ return buffer_copy(static_cast<const mutable_buffer&>(target),
+ const_buffer(source));
+}
+
+/// Copies bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const mutable_buffers_1& source)
+{
+ return buffer_copy(static_cast<const mutable_buffer&>(target),
+ const_buffer(source));
+}
+
+/// Copies bytes from a source buffer sequence to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region 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)
+ */
+template <typename ConstBufferSequence>
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const ConstBufferSequence& source)
+{
+ return buffer_copy(static_cast<const mutable_buffer&>(target), source);
+}
+
+/// Copies bytes from a source buffer 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 representing the memory region 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)
+ */
+template <typename MutableBufferSequence>
+std::size_t buffer_copy(const MutableBufferSequence& target,
+ const const_buffer& source)
+{
+ std::size_t total_bytes_copied = 0;
+
+ typename MutableBufferSequence::const_iterator target_iter = target.begin();
+ typename MutableBufferSequence::const_iterator target_end = target.end();
+
+ for (const_buffer source_buffer(source);
+ buffer_size(source_buffer) && target_iter != target_end; ++target_iter)
+ {
+ mutable_buffer target_buffer(*target_iter);
+ std::size_t bytes_copied = buffer_copy(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+ source_buffer = source_buffer + bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+/// Copies bytes from a source buffer 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 representing the memory region 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)
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const const_buffers_1& source)
+{
+ return buffer_copy(target, static_cast<const const_buffer&>(source));
+}
+
+/// Copies bytes from a source buffer 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 modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const mutable_buffer& source)
+{
+ return buffer_copy(target, const_buffer(source));
+}
+
+/// Copies bytes from a source buffer 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 modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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)
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const mutable_buffers_1& source)
+{
+ return buffer_copy(target, const_buffer(source));
+}
+
+/// 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)
+ */
+template <typename MutableBufferSequence, typename ConstBufferSequence>
+std::size_t buffer_copy(const MutableBufferSequence& target,
+ const ConstBufferSequence& source)
+{
+ std::size_t total_bytes_copied = 0;
+
+ typename MutableBufferSequence::const_iterator target_iter = target.begin();
+ typename MutableBufferSequence::const_iterator target_end = target.end();
+ std::size_t target_buffer_offset = 0;
+
+ typename ConstBufferSequence::const_iterator source_iter = source.begin();
+ typename ConstBufferSequence::const_iterator source_end = source.end();
+ 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(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+
+ if (bytes_copied == buffer_size(target_buffer))
+ {
+ ++target_iter;
+ target_buffer_offset = 0;
+ }
+ else
+ target_buffer_offset += bytes_copied;
+
+ if (bytes_copied == buffer_size(source_buffer))
+ {
+ ++source_iter;
+ source_buffer_offset = 0;
+ }
+ else
+ source_buffer_offset += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const const_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const const_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const mutable_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const mutable_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer sequence to a target
+/// buffer.
+/**
+ * @param target A modifiable buffer representing the memory region 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
+ */
+template <typename ConstBufferSequence>
+inline std::size_t buffer_copy(const mutable_buffer& target,
+ const ConstBufferSequence& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const const_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer representing the memory region 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
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const const_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const mutable_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer to a target buffer.
+/**
+ * @param target A modifiable buffer representing the memory region to which
+ * the bytes will be copied.
+ *
+ * @param source A modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const mutable_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer sequence to a target
+/// buffer.
+/**
+ * @param target A modifiable buffer representing the memory region 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
+ */
+template <typename ConstBufferSequence>
+inline std::size_t buffer_copy(const mutable_buffers_1& target,
+ const ConstBufferSequence& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(buffer(target, max_bytes_to_copy), source);
+}
+
+/// Copies a limited number of bytes from a source buffer 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 representing the memory region 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
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const const_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(target, buffer(source, max_bytes_to_copy));
+}
+
+/// Copies a limited number of bytes from a source buffer 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 representing the memory region 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
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const const_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(target, buffer(source, max_bytes_to_copy));
+}
+
+/// Copies a limited number of bytes from a source buffer 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 modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const mutable_buffer& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(target, buffer(source, max_bytes_to_copy));
+}
+
+/// Copies a limited number of bytes from a source buffer 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 modifiable buffer representing the memory region from which
+ * the bytes will be copied. The contents of the source buffer will not be
+ * modified.
+ *
+ * @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
+ */
+template <typename MutableBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const mutable_buffers_1& source, std::size_t max_bytes_to_copy)
+{
+ return buffer_copy(target, buffer(source, max_bytes_to_copy));
+}
+
+/// 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
+ */
+template <typename MutableBufferSequence, typename ConstBufferSequence>
+std::size_t buffer_copy(const MutableBufferSequence& target,
+ const ConstBufferSequence& source, std::size_t max_bytes_to_copy)
+{
+ std::size_t total_bytes_copied = 0;
+
+ typename MutableBufferSequence::const_iterator target_iter = target.begin();
+ typename MutableBufferSequence::const_iterator target_end = target.end();
+ std::size_t target_buffer_offset = 0;
+
+ typename ConstBufferSequence::const_iterator source_iter = source.begin();
+ typename ConstBufferSequence::const_iterator source_end = source.end();
+ 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(target_buffer,
+ source_buffer, max_bytes_to_copy - total_bytes_copied);
+ total_bytes_copied += bytes_copied;
+
+ if (bytes_copied == buffer_size(target_buffer))
+ {
+ ++target_iter;
+ target_buffer_offset = 0;
+ }
+ else
+ target_buffer_offset += bytes_copied;
+
+ if (bytes_copied == buffer_size(source_buffer))
+ {
+ ++source_iter;
+ source_buffer_offset = 0;
+ }
+ else
+ source_buffer_offset += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+/*@}*/
+
} // namespace asio
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/asio/buffered_read_stream.hpp b/3rdParty/Boost/src/boost/asio/buffered_read_stream.hpp
index af24dd6..3072580 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_read_stream.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,7 +17,6 @@
#include <boost/asio/detail/config.hpp>
#include <cstddef>
-#include <cstring>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/asio/buffered_read_stream_fwd.hpp>
#include <boost/asio/buffer.hpp>
@@ -97,13 +96,6 @@ public:
return next_layer_.lowest_layer();
}
- /// (Deprecated: use get_io_service().) Get the io_service associated with
- /// the object.
- boost::asio::io_service& io_service()
- {
- return next_layer_.get_io_service();
- }
-
/// Get the io_service associated with the object.
boost::asio::io_service& get_io_service()
{
@@ -227,16 +219,7 @@ public:
template <typename MutableBufferSequence>
std::size_t read_some(const MutableBufferSequence& buffers)
{
- typename MutableBufferSequence::const_iterator iter = buffers.begin();
- typename MutableBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::mutable_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
return 0;
if (storage_.empty())
@@ -253,16 +236,7 @@ public:
{
ec = boost::system::error_code();
- typename MutableBufferSequence::const_iterator iter = buffers.begin();
- typename MutableBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::mutable_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
return 0;
if (storage_.empty() && !fill(ec))
@@ -294,24 +268,8 @@ public:
}
else
{
- using namespace std; // For memcpy.
-
- std::size_t bytes_avail = storage_.size();
- std::size_t bytes_copied = 0;
-
- typename MutableBufferSequence::const_iterator iter = buffers_.begin();
- typename MutableBufferSequence::const_iterator end = buffers_.end();
- for (; iter != end && bytes_avail > 0; ++iter)
- {
- std::size_t max_length = buffer_size(*iter);
- std::size_t length = (max_length < bytes_avail)
- ? max_length : bytes_avail;
- memcpy(buffer_cast<void*>(*iter),
- storage_.data() + bytes_copied, length);
- bytes_copied += length;
- bytes_avail -= length;
- }
-
+ std::size_t bytes_copied = boost::asio::buffer_copy(
+ buffers_, storage_.data(), storage_.size());
storage_.consume(bytes_copied);
io_service_.dispatch(detail::bind_handler(handler_, ec, bytes_copied));
}
@@ -330,16 +288,7 @@ public:
void async_read_some(const MutableBufferSequence& buffers,
ReadHandler handler)
{
- typename MutableBufferSequence::const_iterator iter = buffers.begin();
- typename MutableBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::mutable_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
{
get_io_service().post(detail::bind_handler(
handler, boost::system::error_code(), 0));
@@ -398,23 +347,8 @@ private:
template <typename MutableBufferSequence>
std::size_t copy(const MutableBufferSequence& buffers)
{
- using namespace std; // For memcpy.
-
- std::size_t bytes_avail = storage_.size();
- std::size_t bytes_copied = 0;
-
- typename MutableBufferSequence::const_iterator iter = buffers.begin();
- typename MutableBufferSequence::const_iterator end = buffers.end();
- for (; iter != end && bytes_avail > 0; ++iter)
- {
- std::size_t max_length = buffer_size(*iter);
- std::size_t length = (max_length < bytes_avail)
- ? max_length : bytes_avail;
- memcpy(buffer_cast<void*>(*iter), storage_.data() + bytes_copied, length);
- bytes_copied += length;
- bytes_avail -= length;
- }
-
+ std::size_t bytes_copied = boost::asio::buffer_copy(
+ buffers, storage_.data(), storage_.size());
storage_.consume(bytes_copied);
return bytes_copied;
}
@@ -425,24 +359,7 @@ private:
template <typename MutableBufferSequence>
std::size_t peek_copy(const MutableBufferSequence& buffers)
{
- using namespace std; // For memcpy.
-
- std::size_t bytes_avail = storage_.size();
- std::size_t bytes_copied = 0;
-
- typename MutableBufferSequence::const_iterator iter = buffers.begin();
- typename MutableBufferSequence::const_iterator end = buffers.end();
- for (; iter != end && bytes_avail > 0; ++iter)
- {
- std::size_t max_length = buffer_size(*iter);
- std::size_t length = (max_length < bytes_avail)
- ? max_length : bytes_avail;
- memcpy(buffer_cast<void*>(*iter), storage_.data() + bytes_copied, length);
- bytes_copied += length;
- bytes_avail -= length;
- }
-
- return bytes_copied;
+ return boost::asio::buffer_copy(buffers, storage_.data(), storage_.size());
}
/// The next layer.
diff --git a/3rdParty/Boost/src/boost/asio/buffered_read_stream_fwd.hpp b/3rdParty/Boost/src/boost/asio/buffered_read_stream_fwd.hpp
index 9c8a1af..5c8c295 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_read_stream_fwd.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_read_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/3rdParty/Boost/src/boost/asio/buffered_stream.hpp b/3rdParty/Boost/src/boost/asio/buffered_stream.hpp
index 43d21de..632e5ce 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_stream.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_stream.hpp
@@ -2,7 +2,7 @@
// buffered_stream.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -87,13 +87,6 @@ public:
return stream_impl_.lowest_layer();
}
- /// (Deprecated: use get_io_service().) Get the io_service associated with
- /// the object.
- boost::asio::io_service& io_service()
- {
- return stream_impl_.get_io_service();
- }
-
/// Get the io_service associated with the object.
boost::asio::io_service& get_io_service()
{
diff --git a/3rdParty/Boost/src/boost/asio/buffered_stream_fwd.hpp b/3rdParty/Boost/src/boost/asio/buffered_stream_fwd.hpp
index 042b990..5241879 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_stream_fwd.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/3rdParty/Boost/src/boost/asio/buffered_write_stream.hpp b/3rdParty/Boost/src/boost/asio/buffered_write_stream.hpp
index a163b13..11cb872 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_write_stream.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,7 +17,6 @@
#include <boost/asio/detail/config.hpp>
#include <cstddef>
-#include <cstring>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/asio/buffered_write_stream_fwd.hpp>
#include <boost/asio/buffer.hpp>
@@ -98,13 +97,6 @@ public:
return next_layer_.lowest_layer();
}
- /// (Deprecated: use get_io_service().) Get the io_service associated with
- /// the object.
- boost::asio::io_service& io_service()
- {
- return next_layer_.get_io_service();
- }
-
/// Get the io_service associated with the object.
boost::asio::io_service& get_io_service()
{
@@ -184,16 +176,7 @@ public:
template <typename ConstBufferSequence>
std::size_t write_some(const ConstBufferSequence& buffers)
{
- typename ConstBufferSequence::const_iterator iter = buffers.begin();
- typename ConstBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::const_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
return 0;
if (storage_.size() == storage_.capacity())
@@ -210,16 +193,7 @@ public:
{
ec = boost::system::error_code();
- typename ConstBufferSequence::const_iterator iter = buffers.begin();
- typename ConstBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::const_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
return 0;
if (storage_.size() == storage_.capacity() && !flush(ec))
@@ -251,25 +225,14 @@ public:
}
else
{
- using namespace std; // For memcpy.
-
std::size_t orig_size = storage_.size();
std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_copied = 0;
-
- typename ConstBufferSequence::const_iterator iter = buffers_.begin();
- typename ConstBufferSequence::const_iterator end = buffers_.end();
- for (; iter != end && space_avail > 0; ++iter)
- {
- std::size_t bytes_avail = buffer_size(*iter);
- std::size_t length = (bytes_avail < space_avail)
- ? bytes_avail : space_avail;
- storage_.resize(orig_size + bytes_copied + length);
- memcpy(storage_.data() + orig_size + bytes_copied,
- buffer_cast<const void*>(*iter), length);
- bytes_copied += length;
- space_avail -= length;
- }
+ std::size_t bytes_avail = boost::asio::buffer_size(buffers_);
+ std::size_t length = bytes_avail < space_avail
+ ? bytes_avail : space_avail;
+ storage_.resize(orig_size + length);
+ std::size_t bytes_copied = boost::asio::buffer_copy(
+ storage_.data() + orig_size, buffers_, length);
io_service_.dispatch(detail::bind_handler(handler_, ec, bytes_copied));
}
@@ -288,16 +251,7 @@ public:
void async_write_some(const ConstBufferSequence& buffers,
WriteHandler handler)
{
- typename ConstBufferSequence::const_iterator iter = buffers.begin();
- typename ConstBufferSequence::const_iterator end = buffers.end();
- size_t total_buffer_size = 0;
- for (; iter != end; ++iter)
- {
- boost::asio::const_buffer buffer(*iter);
- total_buffer_size += boost::asio::buffer_size(buffer);
- }
-
- if (total_buffer_size == 0)
+ if (boost::asio::buffer_size(buffers) == 0)
{
get_io_service().post(detail::bind_handler(
handler, boost::system::error_code(), 0));
@@ -376,27 +330,13 @@ private:
template <typename ConstBufferSequence>
std::size_t copy(const ConstBufferSequence& buffers)
{
- using namespace std; // For memcpy.
-
std::size_t orig_size = storage_.size();
std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_copied = 0;
-
- typename ConstBufferSequence::const_iterator iter = buffers.begin();
- typename ConstBufferSequence::const_iterator end = buffers.end();
- for (; iter != end && space_avail > 0; ++iter)
- {
- std::size_t bytes_avail = buffer_size(*iter);
- std::size_t length = (bytes_avail < space_avail)
- ? bytes_avail : space_avail;
- storage_.resize(orig_size + bytes_copied + length);
- memcpy(storage_.data() + orig_size + bytes_copied,
- buffer_cast<const void*>(*iter), length);
- bytes_copied += length;
- space_avail -= length;
- }
-
- return bytes_copied;
+ std::size_t bytes_avail = boost::asio::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);
}
/// The next layer.
diff --git a/3rdParty/Boost/src/boost/asio/buffered_write_stream_fwd.hpp b/3rdParty/Boost/src/boost/asio/buffered_write_stream_fwd.hpp
index 0590a96..2da283f 100644
--- a/3rdParty/Boost/src/boost/asio/buffered_write_stream_fwd.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffered_write_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/3rdParty/Boost/src/boost/asio/buffers_iterator.hpp b/3rdParty/Boost/src/boost/asio/buffers_iterator.hpp
index 3375361..c11e146 100644
--- a/3rdParty/Boost/src/boost/asio/buffers_iterator.hpp
+++ b/3rdParty/Boost/src/boost/asio/buffers_iterator.hpp
@@ -2,7 +2,7 @@
// buffers_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,9 +17,9 @@
#include <boost/asio/detail/config.hpp>
#include <cstddef>
+#include <iterator>
#include <boost/assert.hpp>
#include <boost/detail/workaround.hpp>
-#include <boost/iterator.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/asio/buffer.hpp>
@@ -73,18 +73,47 @@ namespace detail
/// A random access iterator over the bytes in a buffer sequence.
template <typename BufferSequence, typename ByteType = char>
class buffers_iterator
- : public boost::iterator<
- std::random_access_iterator_tag,
- typename detail::buffers_iterator_types<
- BufferSequence, ByteType>::byte_type>
{
private:
typedef typename detail::buffers_iterator_types<
BufferSequence, ByteType>::buffer_type buffer_type;
- typedef typename detail::buffers_iterator_types<
- BufferSequence, ByteType>::byte_type byte_type;