passenger 6.0.7 → 6.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1573) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +29 -0
  3. data/CONTRIBUTORS +1 -0
  4. data/README.md +2 -9
  5. data/build/common_library.rb +4 -4
  6. data/build/packaging.rb +4 -2
  7. data/build/support/cxx_dependency_map.rb +1 -0
  8. data/dev/copy_boost_headers +1 -1
  9. data/resources/release.txt +1 -0
  10. data/resources/templates/config/installation_utils/user_support_binaries_dir_not_writable.txt.erb +1 -0
  11. data/resources/templates/standalone/global.erb +4 -0
  12. data/src/agent/Core/AdminPanelConnector.h +1 -1
  13. data/src/agent/Core/ApplicationPool/Group.h +1 -1
  14. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +2 -2
  15. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
  16. data/src/agent/Core/ApplicationPool/Options.h +2 -2
  17. data/src/agent/Core/ApplicationPool/Pool.h +1 -1
  18. data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +1 -1
  19. data/src/agent/Core/Config.h +2 -2
  20. data/src/agent/Core/Controller/Config.h +2 -2
  21. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  22. data/src/agent/Core/SpawningKit/Handshake/Perform.h +1 -1
  23. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  24. data/src/agent/Core/SpawningKit/SmartSpawner.h +1 -1
  25. data/src/agent/Core/SpawningKit/Spawner.h +1 -0
  26. data/src/agent/Core/TelemetryCollector.h +1 -1
  27. data/src/agent/Shared/ApiServerUtils.h +1 -1
  28. data/src/agent/Watchdog/Config.h +1 -1
  29. data/src/agent/Watchdog/InstanceDirToucher.cpp +1 -1
  30. data/src/agent/Watchdog/WatchdogMain.cpp +1 -1
  31. data/src/cxx_supportlib/BackgroundEventLoop.cpp +1 -1
  32. data/src/cxx_supportlib/ConfigKit/Schema.h +1 -1
  33. data/src/cxx_supportlib/ConfigKit/Translator.h +1 -1
  34. data/src/cxx_supportlib/Constants.h +2 -2
  35. data/src/cxx_supportlib/FileTools/FileManip.cpp +10 -1
  36. data/src/cxx_supportlib/FileTools/FileManip.h +16 -0
  37. data/src/cxx_supportlib/IOTools/BufferedIO.h +1 -1
  38. data/src/cxx_supportlib/IOTools/MessageIO.h +1 -1
  39. data/src/cxx_supportlib/SafeLibev.h +1 -1
  40. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -1
  41. data/src/cxx_supportlib/SystemTools/ProcessMetricsCollector.h +1 -1
  42. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +9 -12
  43. data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +5 -1
  44. data/src/cxx_supportlib/oxt/thread.hpp +1 -1
  45. data/src/cxx_supportlib/vendor-copy/websocketpp/changelog.md +107 -5
  46. data/src/cxx_supportlib/vendor-copy/websocketpp/readme.md +2 -2
  47. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/close.hpp +12 -1
  48. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio.hpp +13 -3
  49. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/memory.hpp +0 -1
  50. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/thread.hpp +6 -2
  51. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core.hpp +13 -1
  52. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection.hpp +6 -15
  53. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint.hpp +24 -24
  54. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/disabled.hpp +1 -0
  55. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/enabled.hpp +84 -19
  56. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/frame.hpp +3 -0
  57. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/parser.hpp +4 -0
  58. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/parser.hpp +10 -0
  59. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/connection_impl.hpp +150 -147
  60. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/endpoint_impl.hpp +4 -4
  61. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/base.hpp +1 -1
  62. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi13.hpp +47 -25
  63. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/client_endpoint.hpp +3 -3
  64. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/server_endpoint.hpp +14 -9
  65. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/sha1/sha1.hpp +189 -189
  66. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/connection.hpp +59 -66
  67. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/endpoint.hpp +73 -38
  68. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/none.hpp +9 -7
  69. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/tls.hpp +12 -22
  70. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/endpoint.hpp +1 -1
  71. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/connection.hpp +11 -11
  72. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/endpoint.hpp +1 -1
  73. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/connection.hpp +13 -13
  74. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/endpoint.hpp +3 -3
  75. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/connection.hpp +8 -8
  76. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/uri.hpp +1 -0
  77. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utilities.hpp +2 -4
  78. data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/version.hpp +3 -3
  79. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/compare.hpp +3 -3
  80. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/case_conv.hpp +2 -2
  81. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/classification.hpp +1 -1
  82. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/finder.hpp +15 -15
  83. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter.hpp +1 -1
  84. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/trim.hpp +3 -3
  85. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find_format.hpp +1 -2
  86. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +0 -1
  87. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/iter_find.hpp +8 -0
  88. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/predicate.hpp +4 -3
  89. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/split.hpp +12 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/array.hpp +2 -3
  91. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +47 -17
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +73 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +2 -8
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +37 -20
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +426 -65
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +135 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +432 -257
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +178 -113
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +1 -1
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +433 -257
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +286 -143
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +315 -96
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +241 -64
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +364 -227
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +976 -461
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +21 -44
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +15 -35
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +329 -197
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +1 -1
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +1 -1
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +221 -115
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +11 -47
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +416 -89
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +23 -27
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +31 -30
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +23 -27
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +1 -1
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +473 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +138 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +118 -102
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +3 -3
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +33 -10
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +114 -0
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +1 -1
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +1 -1
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +20 -1
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +4 -3
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +145 -27
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +109 -0
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +107 -1
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bulk_executor_op.hpp +90 -0
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +1 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +1 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +11 -6
  144. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +1 -1
  145. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +9 -1
  146. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +1 -1
  147. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +481 -129
  148. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +1 -1
  149. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +1 -1
  150. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +1 -1
  151. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
  152. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +29 -12
  153. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
  154. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +25 -7
  155. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +36 -16
  156. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +36 -16
  157. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +1 -1
  158. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +1 -1
  159. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +1 -1
  160. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +2 -2
  161. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +205 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +1 -1
  165. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +1 -1
  166. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +1 -1
  167. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +1 -1
  169. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +1 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +1 -1
  171. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +1 -1
  172. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +55 -6
  173. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +1 -1
  174. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +24 -1
  175. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +27 -1
  176. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +1 -1
  177. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +378 -35
  178. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +1 -1
  180. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +218 -84
  181. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +1 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +1 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +1 -1
  184. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +1 -1
  185. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +12 -8
  186. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +40 -2
  187. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +1 -1
  188. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +6 -2
  189. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +1 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +11 -6
  191. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +1 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +1 -1
  194. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +5 -4
  196. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +16 -19
  197. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +4 -4
  198. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +37 -33
  199. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +87 -4
  200. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +1 -1
  201. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +8 -3
  202. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +1 -1
  203. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +1 -1
  204. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +22 -23
  205. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +674 -283
  206. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +15 -6
  207. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +211 -5
  208. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +1 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +9 -10
  210. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +6 -5
  211. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
  212. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +1 -1
  213. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -1
  215. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +177 -0
  216. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +65 -16
  217. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +1 -1
  218. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
  219. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +1 -1
  220. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +4 -1
  223. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +56 -0
  225. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
  226. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +7 -1
  227. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +1 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
  230. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +1 -1
  231. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
  232. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +63 -52
  233. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
  234. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +1 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +1 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +1 -1
  238. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +1 -1
  239. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +2 -2
  241. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +14 -8
  242. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +15 -2
  243. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
  244. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
  246. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
  247. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +1 -1
  249. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
  250. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +16 -6
  251. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +62 -34
  252. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +15 -7
  253. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +15 -14
  254. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +53 -28
  255. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +20 -10
  256. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +43 -19
  257. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +42 -16
  258. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +26 -13
  259. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +48 -20
  260. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +43 -17
  261. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +82 -80
  262. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +77 -47
  263. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +15 -7
  264. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +1 -1
  265. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +1 -1
  266. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +4 -2
  267. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
  268. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +16 -14
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +1 -1
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +31 -13
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +1 -1
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +31 -15
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +18 -18
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +22 -19
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +21 -2
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +1 -1
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +1 -1
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +1 -1
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +1 -1
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +1 -1
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +11 -7
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +24 -12
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +47 -1
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +2 -2
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +1 -1
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +1 -1
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +47 -0
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +1 -1
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +13 -1
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -1
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +1 -1
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -1
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -1
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +1 -1
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +26 -2
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +5 -2
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +1 -1
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +1 -1
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +1 -1
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +7 -1
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +67 -5
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +1 -1
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +1 -1
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +1 -1
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +1 -1
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +65 -3
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +177 -2
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +13 -8
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +1 -1
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +84 -8
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +46 -10
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +27 -14
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +1 -1
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +48 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +251 -0
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +2266 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +49 -0
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +1353 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +1066 -0
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +394 -0
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +1020 -0
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +490 -0
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +187 -0
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +203 -0
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_invocable.hpp +154 -0
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +107 -0
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_receiver.hpp +130 -0
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/bulk_sender.hpp +263 -0
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/submit_receiver.hpp +235 -0
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/void_receiver.hpp +92 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +270 -0
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +240 -0
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +42 -0
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/receiver_invocation_error.ipp +38 -0
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +73 -0
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +919 -0
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +180 -0
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +96 -0
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +723 -0
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +329 -0
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +282 -0
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver_invocation_error.hpp +50 -0
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +722 -0
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +294 -0
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +88 -0
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +313 -0
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +257 -0
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +257 -0
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +490 -0
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +254 -0
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +454 -0
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +3 -2
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +8 -2
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +129 -12
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +2 -2
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +4 -4
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +1 -1
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +4 -4
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +4 -4
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +4 -4
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +29 -6
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +30 -4
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +1 -1
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +438 -0
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +154 -56
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +148 -52
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +300 -0
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/compose.hpp +637 -0
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +299 -243
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +204 -33
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +132 -0
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +199 -34
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +1 -1
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +8 -6
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +1 -1
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +16 -101
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +6 -1
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +14 -5
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +209 -114
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +4 -3
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +51 -0
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +204 -33
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +619 -132
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +194 -90
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +2278 -445
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/impl → impl}/redirect_error.hpp +148 -52
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +1 -1
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +59 -68
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +2 -2
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +4 -1
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +1 -1
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +25 -6
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +114 -13
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +261 -38
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +73 -8
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +281 -0
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +131 -40
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +562 -132
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +185 -91
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +714 -60
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +46 -54
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +1 -1
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +1 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +35 -27
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +32 -26
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +1 -1
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +1 -1
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +41 -36
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +1 -1
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +1 -1
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +1 -1
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +24 -23
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +200 -190
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +1 -1
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +1 -1
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +1 -1
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +1 -1
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +21 -19
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +10 -10
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +7 -7
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +1 -1
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +23 -18
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +1 -1
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +11 -11
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +1 -1
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +26 -26
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +1 -1
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +1 -1
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +1 -1
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +1 -1
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +1 -1
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +8 -8
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +1 -1
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +1 -1
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +1 -1
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +1 -1
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +9 -9
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +7 -7
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +3 -3
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +3 -3
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +63 -0
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +1 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +10 -2
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +14 -19
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +4 -4
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +7 -1
  468. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +8 -1
  469. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +4 -4
  470. data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +60 -0
  471. data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +1 -1
  472. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +1 -1
  473. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +189 -74
  474. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +180 -72
  475. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +5 -612
  476. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +2 -2
  477. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +3 -326
  478. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +29 -10
  479. data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +660 -0
  480. data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +300 -0
  481. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +398 -57
  482. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +51 -28
  483. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +1460 -423
  484. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/redirect_error.hpp → redirect_error.hpp} +9 -10
  485. data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +528 -0
  486. data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +314 -0
  487. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +3 -736
  488. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +1 -1
  489. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +3 -422
  490. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +26 -26
  491. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +13 -5
  492. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +2 -1
  493. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +4 -1
  494. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +1 -1
  495. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +6 -1
  496. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +6 -1
  497. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +6 -1
  498. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +37 -10
  499. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +3 -3
  500. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +51 -8
  501. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +1 -1
  502. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +5 -1
  503. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +1 -1
  504. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +6 -1
  505. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +17 -2
  506. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +41 -6
  507. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +1 -1
  508. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +11 -2
  509. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +21 -7
  510. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +92 -0
  511. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +1 -1
  512. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +44 -10
  513. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +3 -1
  514. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +75 -0
  515. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +5 -1
  516. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +2 -1
  517. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +7 -3
  518. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +235 -97
  519. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
  520. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +1 -1
  521. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
  522. data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +33 -0
  523. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +1 -1
  524. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +264 -13
  525. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
  526. data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +16 -4
  527. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +558 -25
  528. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +1 -1
  529. data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +47 -0
  530. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +917 -38
  531. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
  532. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_free.hpp +116 -0
  533. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_member.hpp +116 -0
  534. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_free.hpp +114 -0
  535. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_member.hpp +114 -0
  536. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +102 -0
  537. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_free.hpp +110 -0
  538. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +110 -0
  539. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +110 -0
  540. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +110 -0
  541. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +110 -0
  542. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +110 -0
  543. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +110 -0
  544. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +110 -0
  545. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +110 -0
  546. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +110 -0
  547. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +110 -0
  548. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_free.hpp +110 -0
  549. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_member.hpp +110 -0
  550. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_free.hpp +110 -0
  551. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_member.hpp +110 -0
  552. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_free.hpp +114 -0
  553. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_member.hpp +114 -0
  554. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_free.hpp +236 -0
  555. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_member.hpp +236 -0
  556. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_free.hpp +110 -0
  557. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_member.hpp +110 -0
  558. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +110 -0
  559. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +125 -0
  560. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +125 -0
  561. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_free.hpp +114 -0
  562. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_member.hpp +114 -0
  563. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +1 -1
  564. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +2 -2
  565. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +1 -1
  566. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +1 -1
  567. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +1 -1
  568. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +101 -36
  569. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +1 -1
  570. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +1 -1
  571. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
  572. data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +171 -0
  573. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
  574. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
  575. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
  576. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +1 -1
  577. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +295 -42
  578. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +363 -0
  579. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +186 -72
  580. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +188 -73
  581. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +3 -346
  582. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +4 -296
  583. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +38 -9
  584. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +3 -344
  585. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +3 -328
  586. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +372 -54
  587. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +51 -28
  588. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
  589. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +93 -0
  590. data/src/cxx_supportlib/vendor-modified/boost/atomic.hpp +9 -0
  591. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +178 -11
  592. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_flag.hpp +12 -3
  593. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_ref.hpp +85 -0
  594. data/src/cxx_supportlib/vendor-modified/boost/atomic/capabilities.hpp +2 -191
  595. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/addressof.hpp +3 -0
  596. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/aligned_variable.hpp +57 -0
  597. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag_impl.hpp +129 -0
  598. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{atomic_template.hpp → atomic_impl.hpp} +327 -429
  599. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +1126 -0
  600. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +23 -4
  601. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_fp_cast.hpp +3 -0
  602. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/capabilities.hpp +217 -0
  603. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_arch_gcc_aarch32.hpp +46 -0
  604. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_arch_gcc_aarch64.hpp +58 -0
  605. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{caps_gcc_alpha.hpp → caps_arch_gcc_alpha.hpp} +4 -4
  606. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{hwcaps_gcc_arm.hpp → caps_arch_gcc_arm.hpp} +37 -8
  607. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{hwcaps_gcc_ppc.hpp → caps_arch_gcc_ppc.hpp} +19 -6
  608. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{caps_gcc_sparc.hpp → caps_arch_gcc_sparc.hpp} +4 -4
  609. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{hwcaps_gcc_x86.hpp → caps_arch_gcc_x86.hpp} +22 -6
  610. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{caps_msvc_arm.hpp → caps_arch_msvc_arm.hpp} +4 -4
  611. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{caps_msvc_x86.hpp → caps_arch_msvc_x86.hpp} +12 -6
  612. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_atomic.hpp +100 -75
  613. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sync.hpp +0 -7
  614. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas_based_exchange.hpp +50 -0
  615. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/classify.hpp +81 -0
  616. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +39 -15
  617. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_operations.hpp +50 -0
  618. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_operations_fwd.hpp +38 -0
  619. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp +1121 -0
  620. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp +1909 -0
  621. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_alpha.hpp → core_arch_ops_gcc_alpha.hpp} +280 -289
  622. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_arm.hpp → core_arch_ops_gcc_arm.hpp} +467 -447
  623. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_ppc.hpp → core_arch_ops_gcc_ppc.hpp} +75 -94
  624. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_sparc.hpp → core_arch_ops_gcc_sparc.hpp} +33 -58
  625. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_x86_dcas.hpp → core_arch_ops_gcc_x86.hpp} +507 -20
  626. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_msvc_arm.hpp → core_arch_ops_msvc_arm.hpp} +58 -54
  627. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_msvc_x86.hpp → core_arch_ops_msvc_x86.hpp} +69 -101
  628. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations.hpp +49 -0
  629. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_emulated.hpp +195 -0
  630. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_emulated_fwd.hpp +38 -0
  631. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_fwd.hpp +38 -0
  632. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_cas_based.hpp → core_ops_cas_based.hpp} +9 -22
  633. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_gcc_atomic.hpp +306 -0
  634. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_gcc_sync.hpp → core_ops_gcc_sync.hpp} +75 -52
  635. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_linux_arm.hpp → core_ops_linux_arm.hpp} +32 -43
  636. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_windows.hpp +201 -0
  637. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{ops_extending_cas_based.hpp → extending_cas_based_arithmetic.hpp} +12 -9
  638. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_operations_fwd.hpp +4 -1
  639. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_emulated.hpp +23 -12
  640. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_generic.hpp +12 -9
  641. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_operations_fwd.hpp +4 -1
  642. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_emulated.hpp +60 -40
  643. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch32.hpp +1060 -0
  644. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch64.hpp +1330 -0
  645. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_arm.hpp +363 -355
  646. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_ppc.hpp +94 -91
  647. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_x86.hpp +232 -102
  648. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_generic.hpp +9 -17
  649. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_arm.hpp +6 -4
  650. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_x86.hpp +119 -92
  651. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_operations.hpp +41 -0
  652. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp +60 -0
  653. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch64.hpp +58 -0
  654. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_alpha.hpp +53 -0
  655. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp +90 -0
  656. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_ppc.hpp +68 -0
  657. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_sparc.hpp +70 -0
  658. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp +69 -0
  659. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_arm.hpp +66 -0
  660. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp +66 -0
  661. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations.hpp +41 -0
  662. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations_emulated.hpp +50 -0
  663. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_atomic.hpp +75 -0
  664. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_sync.hpp +53 -0
  665. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_linux_arm.hpp +64 -0
  666. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_windows.hpp +67 -0
  667. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/footer.hpp +24 -0
  668. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_operations_fwd.hpp +4 -1
  669. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_emulated.hpp +14 -8
  670. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_generic.hpp +6 -3
  671. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/futex.hpp +147 -0
  672. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc_arm_asm_common.hpp +75 -0
  673. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp +66 -0
  674. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/header.hpp +72 -0
  675. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/{integral_extend.hpp → integral_conversions.hpp} +8 -5
  676. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +35 -11
  677. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/intptr.hpp +46 -0
  678. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lock_pool.hpp +151 -0
  679. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/memory_order_utils.hpp +47 -0
  680. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/once_flag.hpp +43 -0
  681. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_aarch32_common.hpp +53 -0
  682. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_aarch64_common.hpp +53 -0
  683. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm_common.hpp +8 -79
  684. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc_common.hpp +4 -1
  685. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_common.hpp +7 -2
  686. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +23 -5
  687. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +64 -27
  688. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_traits.hpp +187 -0
  689. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/alignment_of.hpp +51 -0
  690. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_floating_point.hpp +3 -2
  691. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_copyable.hpp +45 -0
  692. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_capabilities.hpp +363 -0
  693. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_caps_dragonfly_umtx.hpp +30 -0
  694. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_caps_freebsd_umtx.hpp +40 -0
  695. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_caps_futex.hpp +31 -0
  696. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_caps_windows.hpp +55 -0
  697. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_operations.hpp +28 -0
  698. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_operations_fwd.hpp +43 -0
  699. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp +75 -0
  700. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_emulated.hpp +97 -0
  701. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_freebsd_umtx.hpp +119 -0
  702. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_futex.hpp +111 -0
  703. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_generic.hpp +143 -0
  704. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_windows.hpp +150 -0
  705. data/src/cxx_supportlib/vendor-modified/boost/atomic/fences.hpp +7 -18
  706. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic.hpp +85 -0
  707. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_flag.hpp +40 -0
  708. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_ref.hpp +85 -0
  709. data/src/cxx_supportlib/vendor-modified/boost/bind.hpp +20 -1
  710. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +11 -11
  711. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_template.hpp +1 -1
  712. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +25 -11
  713. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_cc.hpp +18 -18
  714. data/src/cxx_supportlib/vendor-modified/boost/bind/placeholders.hpp +1 -1
  715. data/src/cxx_supportlib/vendor-modified/boost/bind/storage.hpp +1 -1
  716. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/chrono.hpp +26 -6
  717. data/src/cxx_supportlib/vendor-modified/boost/chrono/system_clocks.hpp +2 -2
  718. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +8 -5
  719. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +107 -105
  720. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +21 -21
  721. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +25 -31
  722. data/src/cxx_supportlib/vendor-modified/boost/concept/assert.hpp +1 -1
  723. data/src/cxx_supportlib/vendor-modified/boost/config/abi_prefix.hpp +1 -1
  724. data/src/cxx_supportlib/vendor-modified/boost/config/abi_suffix.hpp +1 -3
  725. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +72 -22
  726. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +4 -1
  727. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +13 -0
  728. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +155 -10
  729. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +2 -0
  730. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +5 -0
  731. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +2 -0
  732. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +21 -5
  733. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +2 -0
  734. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +1 -0
  735. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +7 -0
  736. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +2 -0
  737. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +2 -0
  738. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +2 -0
  739. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +2 -0
  740. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +2 -0
  741. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +15 -7
  742. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +5 -0
  743. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +2 -0
  744. data/src/cxx_supportlib/vendor-modified/boost/config/detail/select_compiler_config.hpp +1 -1
  745. data/src/cxx_supportlib/vendor-modified/boost/config/detail/select_stdlib_config.hpp +13 -2
  746. data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +68 -4
  747. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +3 -0
  748. data/src/cxx_supportlib/vendor-modified/boost/config/platform/vxworks.hpp +63 -74
  749. data/src/cxx_supportlib/vendor-modified/boost/config/requires_threads.hpp +1 -1
  750. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +10 -4
  751. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +1 -0
  752. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +2 -0
  753. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +9 -1
  754. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +1 -0
  755. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +1 -0
  756. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +2 -1
  757. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +1 -0
  758. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +6 -5
  759. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +1 -0
  760. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/xlcpp_zos.hpp +1 -0
  761. data/src/cxx_supportlib/vendor-modified/boost/config/user.hpp +2 -2
  762. data/src/cxx_supportlib/vendor-modified/boost/config/workaround.hpp +15 -0
  763. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +10 -10
  764. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +13 -13
  765. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +19 -3
  766. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +117 -29
  767. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +250 -208
  768. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +7 -7
  769. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +6 -6
  770. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +4 -4
  771. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_list.hpp +2 -1
  772. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_slist.hpp +2 -1
  773. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +2 -2
  774. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_or_allocator_rebind.hpp +4 -0
  775. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +21 -116
  776. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +11 -8
  777. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +14 -14
  778. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +30 -24
  779. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_container.hpp +7 -0
  780. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +133 -117
  781. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +2 -2
  782. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +83 -18
  783. data/src/cxx_supportlib/vendor-modified/boost/container/detail/thread_mutex.hpp +6 -6
  784. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +103 -69
  785. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_functors.hpp +6 -0
  786. data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +3 -12
  787. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +6 -2
  788. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +51 -45
  789. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +24 -22
  790. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +83 -77
  791. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +82 -87
  792. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +17 -2
  793. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +2 -2
  794. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +278 -2
  795. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +3 -3
  796. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +1 -4
  797. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +30 -1
  798. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +5 -4
  799. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +90 -6
  800. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/synchronized_pool_resource.hpp +4 -4
  801. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/unsynchronized_pool_resource.hpp +4 -4
  802. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +80 -80
  803. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +63 -67
  804. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +48 -42
  805. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +150 -105
  806. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +174 -155
  807. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +157 -105
  808. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +54 -53
  809. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +15 -15
  810. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +207 -207
  811. data/src/cxx_supportlib/vendor-modified/boost/container_hash/extensions.hpp +0 -51
  812. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +4 -3
  813. data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +2 -2
  814. data/src/cxx_supportlib/vendor-modified/boost/core/alloc_construct.hpp +169 -0
  815. data/src/cxx_supportlib/vendor-modified/boost/core/allocator_access.hpp +633 -0
  816. data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +6 -4
  817. data/src/cxx_supportlib/vendor-modified/boost/core/default_allocator.hpp +148 -0
  818. data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +16 -6
  819. data/src/cxx_supportlib/vendor-modified/boost/core/first_scalar.hpp +45 -0
  820. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +157 -50
  821. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +82 -1
  822. data/src/cxx_supportlib/vendor-modified/boost/core/no_exceptions_support.hpp +14 -2
  823. data/src/cxx_supportlib/vendor-modified/boost/core/noinit_adaptor.hpp +87 -0
  824. data/src/cxx_supportlib/vendor-modified/boost/core/nvp.hpp +57 -0
  825. data/src/cxx_supportlib/vendor-modified/boost/core/pointer_traits.hpp +1 -0
  826. data/src/cxx_supportlib/vendor-modified/boost/core/quick_exit.hpp +1 -1
  827. data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +1 -1
  828. data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +6 -3
  829. data/src/cxx_supportlib/vendor-modified/boost/core/typeinfo.hpp +2 -2
  830. data/src/cxx_supportlib/vendor-modified/boost/core/uncaught_exceptions.hpp +155 -0
  831. data/src/cxx_supportlib/vendor-modified/boost/core/use_default.hpp +17 -0
  832. data/src/cxx_supportlib/vendor-modified/boost/cstdint.hpp +5 -5
  833. data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +3 -3
  834. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +9 -4
  835. data/src/cxx_supportlib/vendor-modified/boost/date_time/compiler_config.hpp +4 -17
  836. data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +19 -11
  837. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +23 -23
  838. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +17 -22
  839. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +44 -49
  840. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +5 -6
  841. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generators.hpp +24 -19
  842. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_parsing.hpp +51 -25
  843. data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_rules.hpp +56 -56
  844. data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_transition_generators.hpp +2 -2
  845. data/src/cxx_supportlib/vendor-modified/boost/date_time/find_match.hpp +42 -0
  846. data/src/cxx_supportlib/vendor-modified/boost/date_time/format_date_parser.hpp +98 -98
  847. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +22 -14
  848. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +4 -4
  849. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +44 -32
  850. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +2 -2
  851. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +51 -23
  852. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +29 -27
  853. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +43 -9
  854. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +3 -3
  855. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +32 -13
  856. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +15 -17
  857. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +27 -22
  858. data/src/cxx_supportlib/vendor-modified/boost/date_time/int_adapter.hpp +57 -37
  859. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time_io.hpp +3 -0
  860. data/src/cxx_supportlib/vendor-modified/boost/date_time/locale_config.hpp +3 -3
  861. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +44 -47
  862. data/src/cxx_supportlib/vendor-modified/boost/date_time/period_formatter.hpp +34 -31
  863. data/src/cxx_supportlib/vendor-modified/boost/date_time/period_parser.hpp +27 -28
  864. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +8 -8
  865. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +13 -26
  866. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +4 -4
  867. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +22 -4
  868. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_serialize.hpp +28 -12
  869. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_formatter.hpp +1 -0
  870. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_parser.hpp +0 -5
  871. data/src/cxx_supportlib/vendor-modified/boost/date_time/string_parse_tree.hpp +5 -3
  872. data/src/cxx_supportlib/vendor-modified/boost/date_time/strings_from_facet.hpp +4 -2
  873. data/src/cxx_supportlib/vendor-modified/boost/date_time/time.hpp +24 -3
  874. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +56 -44
  875. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +8 -11
  876. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +3 -8
  877. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_resolution_traits.hpp +18 -18
  878. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_counted.hpp +65 -50
  879. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_split.hpp +43 -30
  880. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +1 -1
  881. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_names.hpp +1 -1
  882. data/src/cxx_supportlib/vendor-modified/boost/date_time/tz_db_base.hpp +0 -1
  883. data/src/cxx_supportlib/vendor-modified/boost/date_time/wrapping_int.hpp +16 -15
  884. data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +7 -5
  885. data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +3 -4
  886. data/src/cxx_supportlib/vendor-modified/boost/exception/current_exception_cast.hpp +10 -4
  887. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/clone_current_exception.hpp +10 -4
  888. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +12 -7
  889. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +63 -8
  890. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/is_output_streamable.hpp +9 -4
  891. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/object_hex_dump.hpp +9 -4
  892. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/shared_ptr.hpp +2 -2
  893. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +9 -4
  894. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +15 -6
  895. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +19 -57
  896. data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +9 -4
  897. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +11 -6
  898. data/src/cxx_supportlib/vendor-modified/boost/exception/to_string.hpp +9 -4
  899. data/src/cxx_supportlib/vendor-modified/boost/exception/to_string_stub.hpp +9 -4
  900. data/src/cxx_supportlib/vendor-modified/boost/exception_ptr.hpp +2 -2
  901. data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +13 -6
  902. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +4 -12
  903. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +22 -4
  904. data/src/cxx_supportlib/vendor-modified/boost/integer.hpp +2 -2
  905. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_ct.hpp +1 -1
  906. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +30 -28
  907. data/src/cxx_supportlib/vendor-modified/boost/integer/extended_euclidean.hpp +83 -0
  908. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_log2.hpp +6 -6
  909. data/src/cxx_supportlib/vendor-modified/boost/integer/mod_inverse.hpp +53 -0
  910. data/src/cxx_supportlib/vendor-modified/boost/integer/static_log2.hpp +2 -3
  911. data/src/cxx_supportlib/vendor-modified/boost/integer/static_min_max.hpp +1 -0
  912. data/src/cxx_supportlib/vendor-modified/boost/integer_traits.hpp +1 -1
  913. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +22 -22
  914. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +11 -11
  915. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +22 -22
  916. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +11 -11
  917. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +2 -2
  918. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +3 -3
  919. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +12 -12
  920. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +18 -9
  921. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +12 -4
  922. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +10 -10
  923. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +1 -1
  924. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +15 -3
  925. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/math.hpp +7 -12
  926. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/mpl.hpp +1 -0
  927. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +13 -1
  928. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +23 -11
  929. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +6 -1
  930. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +13 -17
  931. data/src/cxx_supportlib/vendor-modified/boost/intrusive/intrusive_fwd.hpp +3 -0
  932. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +9 -9
  933. data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +9 -1
  934. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +6 -0
  935. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +14 -14
  936. data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +2 -2
  937. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +11 -11
  938. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +1 -1
  939. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +22 -22
  940. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +22 -22
  941. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +11 -11
  942. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +11 -11
  943. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +22 -22
  944. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +11 -11
  945. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +93 -66
  946. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +17 -14
  947. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +67 -60
  948. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +9 -9
  949. data/src/cxx_supportlib/vendor-modified/boost/io/ios_state.hpp +361 -315
  950. data/src/cxx_supportlib/vendor-modified/boost/io_fwd.hpp +45 -49
  951. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_def.hpp +4 -4
  952. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +3 -2
  953. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +3 -3
  954. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +1 -1
  955. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
  956. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +18 -13
  957. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +43 -43
  958. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +2 -2
  959. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +1 -1
  960. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
  961. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +5 -5
  962. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
  963. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
  964. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +1 -1
  965. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +1 -1
  966. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/c_regex_traits.cpp +2 -2
  967. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cregex.cpp +10 -3
  968. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/instances.cpp +1 -1
  969. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +7 -0
  970. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +4 -2
  971. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_traits_defaults.cpp +2 -2
  972. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +3 -1
  973. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wc_regex_traits.cpp +5 -5
  974. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +7 -0
  975. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/winstances.cpp +1 -1
  976. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +0 -1
  977. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +4 -3
  978. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +12 -7
  979. data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +50 -52
  980. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +41 -7
  981. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +23 -3
  982. data/src/cxx_supportlib/vendor-modified/boost/math/tools/promotion.hpp +6 -6
  983. data/src/cxx_supportlib/vendor-modified/boost/math/tools/user.hpp +2 -2
  984. data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +6 -12
  985. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +35 -26
  986. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +18 -12
  987. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +103 -318
  988. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +437 -10
  989. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +68 -0
  990. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/set_difference.hpp +1 -1
  991. data/src/cxx_supportlib/vendor-modified/boost/move/algo/predicate.hpp +15 -0
  992. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_to_raw_pointer.hpp +3 -3
  993. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +11 -6
  994. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +2 -1
  995. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
  996. data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +1 -1
  997. data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +3 -3
  998. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/common_name_wknd.hpp +2 -2
  999. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/adl.hpp +1 -1
  1000. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/arrays.hpp +1 -1
  1001. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bcc.hpp +2 -2
  1002. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bind.hpp +1 -1
  1003. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/compiler.hpp +2 -2
  1004. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ctps.hpp +1 -1
  1005. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dtp.hpp +3 -3
  1006. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/forwarding.hpp +1 -1
  1007. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/integral.hpp +1 -1
  1008. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/operators.hpp +1 -1
  1009. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/overload_resolution.hpp +1 -1
  1010. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/preprocessor.hpp +1 -1
  1011. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ttp.hpp +2 -2
  1012. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/count_impl.hpp +1 -1
  1013. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_impl_body.hpp +3 -3
  1014. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_rebind.hpp +4 -4
  1015. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/integral_wrapper.hpp +1 -1
  1016. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_support.hpp +3 -3
  1017. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/nested_type_wknd.hpp +1 -1
  1018. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/size_impl.hpp +1 -1
  1019. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/static_cast.hpp +1 -1
  1020. data/src/cxx_supportlib/vendor-modified/boost/mpl/has_xxx.hpp +2 -2
  1021. data/src/cxx_supportlib/vendor-modified/boost/mpl/if.hpp +1 -1
  1022. data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c.hpp +1 -1
  1023. data/src/cxx_supportlib/vendor-modified/boost/mpl/lower_bound.hpp +1 -1
  1024. data/src/cxx_supportlib/vendor-modified/boost/mpl/numeric_cast.hpp +1 -1
  1025. data/src/cxx_supportlib/vendor-modified/boost/mpl/upper_bound.hpp +1 -1
  1026. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/at.hpp +1 -1
  1027. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +4 -3
  1028. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/converter_policies.hpp +4 -3
  1029. data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +31 -24
  1030. data/src/cxx_supportlib/vendor-modified/boost/optional/bad_optional_access.hpp +9 -0
  1031. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +1 -1
  1032. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +9 -4
  1033. data/src/cxx_supportlib/vendor-modified/boost/parameter/are_tagged_arguments.hpp +125 -0
  1034. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/always_true_predicate.hpp +42 -0
  1035. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/arg_list.hpp +1252 -358
  1036. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/as_lvalue.hpp +25 -0
  1037. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/augment_predicate.hpp +198 -0
  1038. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/cast.hpp +7 -136
  1039. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/default.hpp +90 -59
  1040. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/has_nested_template_fn.hpp +111 -0
  1041. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/is_maybe.hpp +42 -16
  1042. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/is_placeholder.hpp +64 -0
  1043. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/is_tagged_argument.hpp +95 -0
  1044. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/lambda_tag.hpp +16 -0
  1045. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/maybe.hpp +128 -97
  1046. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/name.hpp +93 -0
  1047. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/as_parameter_requirements.hpp +32 -0
  1048. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/deduce_tag.hpp +217 -0
  1049. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/deduced_item.hpp +34 -0
  1050. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/insert_tagged.hpp +23 -0
  1051. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/is_named_argument.hpp +43 -0
  1052. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/item.hpp +47 -0
  1053. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/make_arg_list.hpp +438 -0
  1054. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/make_deduced_items.hpp +53 -0
  1055. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/make_items.hpp +45 -0
  1056. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/make_parameter_spec_items.hpp +244 -0
  1057. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/parameter_requirements.hpp +25 -0
  1058. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/predicate.hpp +87 -0
  1059. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/satisfies.hpp +142 -0
  1060. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_deduced.hpp +59 -0
  1061. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg.hpp +30 -0
  1062. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp +67 -0
  1063. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_template_keyword_arg.hpp +30 -0
  1064. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_type.hpp +89 -0
  1065. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/unmatched_argument.hpp +41 -0
  1066. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/parameter_requirements.hpp +7 -20
  1067. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/parenthesized_type.hpp +8 -31
  1068. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pp_impl/argument_pack.hpp +91 -0
  1069. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pp_impl/match.hpp +55 -0
  1070. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pp_impl/unwrap_predicate.hpp +97 -0
  1071. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/binary_seq_for_each.hpp +1638 -0
  1072. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/binary_seq_for_each_inc.hpp +1796 -0
  1073. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/binary_seq_to_args.hpp +65 -0
  1074. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/convert_binary_seq.hpp +57 -0
  1075. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/flatten.hpp +7 -110
  1076. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/for_each.hpp +7 -98
  1077. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/for_each_pred.hpp +1029 -0
  1078. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/argument_specs.hpp +24 -0
  1079. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/arity_range.hpp +42 -0
  1080. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/flatten.hpp +143 -0
  1081. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/for_each.hpp +152 -0
  1082. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/forwarding_overloads.hpp +509 -0
  1083. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_cast.hpp +730 -0
  1084. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_dispatch_layer.hpp +474 -0
  1085. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_dispatch_tuple.hpp +33 -0
  1086. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_forward_match.hpp +43 -0
  1087. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_name.hpp +152 -0
  1088. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/no_spec_overloads.hpp +331 -0
  1089. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/parenthesized_return_type.hpp +122 -0
  1090. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/parenthesized_type.hpp +34 -0
  1091. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/specification.hpp +109 -0
  1092. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/split_args.hpp +71 -0
  1093. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/inc_binary_seq.hpp +78 -0
  1094. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/is_binary.hpp +31 -0
  1095. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/is_nullary.hpp +32 -0
  1096. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/no_perfect_forwarding_begin.hpp +165 -0
  1097. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/no_perfect_forwarding_end.hpp +24 -0
  1098. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/nullptr.hpp +18 -0
  1099. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/overloads.hpp +92 -0
  1100. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/qualifier.hpp +88 -0
  1101. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/seq_enum.hpp +26 -0
  1102. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/seq_merge.hpp +1807 -0
  1103. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/result_of0.hpp +46 -29
  1104. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/set.hpp +94 -42
  1105. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tag.hpp +149 -27
  1106. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tagged_argument.hpp +865 -159
  1107. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tagged_argument_fwd.hpp +38 -0
  1108. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/template_keyword.hpp +76 -34
  1109. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +159 -76
  1110. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/use_default.hpp +17 -0
  1111. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/use_default_tag.hpp +29 -0
  1112. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/void.hpp +25 -16
  1113. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/yesno.hpp +30 -14
  1114. data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +154 -70
  1115. data/src/cxx_supportlib/vendor-modified/boost/parameter/compose.hpp +210 -0
  1116. data/src/cxx_supportlib/vendor-modified/boost/parameter/config.hpp +75 -6
  1117. data/src/cxx_supportlib/vendor-modified/boost/parameter/deduced.hpp +132 -0
  1118. data/src/cxx_supportlib/vendor-modified/boost/parameter/is_argument_pack.hpp +29 -0
  1119. data/src/cxx_supportlib/vendor-modified/boost/parameter/keyword.hpp +724 -102
  1120. data/src/cxx_supportlib/vendor-modified/boost/parameter/keyword_fwd.hpp +23 -0
  1121. data/src/cxx_supportlib/vendor-modified/boost/parameter/macros.hpp +205 -72
  1122. data/src/cxx_supportlib/vendor-modified/boost/parameter/match.hpp +37 -44
  1123. data/src/cxx_supportlib/vendor-modified/boost/parameter/name.hpp +100 -126
  1124. data/src/cxx_supportlib/vendor-modified/boost/parameter/nested_keyword.hpp +111 -0
  1125. data/src/cxx_supportlib/vendor-modified/boost/parameter/optional.hpp +67 -0
  1126. data/src/cxx_supportlib/vendor-modified/boost/parameter/parameters.hpp +553 -884
  1127. data/src/cxx_supportlib/vendor-modified/boost/parameter/preprocessor.hpp +156 -1016
  1128. data/src/cxx_supportlib/vendor-modified/boost/parameter/preprocessor_no_spec.hpp +74 -0
  1129. data/src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp +66 -0
  1130. data/src/cxx_supportlib/vendor-modified/boost/parameter/template_keyword.hpp +87 -0
  1131. data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +152 -70
  1132. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture.h +1 -0
  1133. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/alpha.h +17 -16
  1134. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +86 -32
  1135. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/blackfin.h +11 -10
  1136. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/convex.h +14 -13
  1137. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ia64.h +17 -16
  1138. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/m68k.h +28 -27
  1139. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/mips.h +21 -20
  1140. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/parisc.h +19 -18
  1141. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ppc.h +23 -22
  1142. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ptx.h +10 -9
  1143. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/pyramid.h +8 -7
  1144. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/riscv.h +43 -0
  1145. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/rs6k.h +16 -15
  1146. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sparc.h +12 -11
  1147. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/superh.h +16 -15
  1148. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys370.h +10 -9
  1149. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys390.h +10 -9
  1150. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86.h +4 -4
  1151. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/32.h +26 -25
  1152. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/64.h +16 -15
  1153. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/z.h +9 -8
  1154. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/borland.h +12 -11
  1155. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/clang.h +10 -9
  1156. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/comeau.h +10 -9
  1157. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/compaq.h +12 -11
  1158. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/diab.h +10 -9
  1159. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/digitalmars.h +10 -9
  1160. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/dignus.h +10 -9
  1161. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/edg.h +10 -9
  1162. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ekopath.h +10 -9
  1163. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc.h +11 -10
  1164. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc_xml.h +9 -8
  1165. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/greenhills.h +12 -11
  1166. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/hp_acc.h +10 -9
  1167. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/iar.h +10 -9
  1168. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ibm.h +15 -14
  1169. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +18 -17
  1170. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/kai.h +10 -9
  1171. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/llvm.h +9 -8
  1172. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metaware.h +9 -8
  1173. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metrowerks.h +14 -13
  1174. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/microtec.h +9 -8
  1175. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/mpw.h +12 -11
  1176. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/nvcc.h +10 -9
  1177. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/palm.h +10 -9
  1178. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/pgi.h +10 -9
  1179. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sgi_mipspro.h +12 -11
  1180. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sunpro.h +14 -13
  1181. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/tendra.h +9 -8
  1182. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +13 -12
  1183. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/watcom.h +10 -9
  1184. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +95 -46
  1185. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm.h +21 -19
  1186. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm/versions.h +16 -10
  1187. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc.h +21 -19
  1188. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc/versions.h +27 -21
  1189. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +39 -37
  1190. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86/versions.h +73 -67
  1191. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +25 -23
  1192. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +24 -19
  1193. data/src/cxx_supportlib/vendor-modified/boost/predef/language/cuda.h +11 -10
  1194. data/src/cxx_supportlib/vendor-modified/boost/predef/language/objc.h +9 -8
  1195. data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdc.h +10 -9
  1196. data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdcpp.h +39 -32
  1197. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/cloudabi.h +10 -9
  1198. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/gnu.h +12 -11
  1199. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/uc.h +10 -9
  1200. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/vms.h +9 -8
  1201. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/zos.h +10 -9
  1202. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/cxx.h +10 -9
  1203. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/dinkumware.h +11 -10
  1204. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/libcomo.h +10 -9
  1205. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/modena.h +10 -9
  1206. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/msl.h +12 -11
  1207. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/roguewave.h +11 -10
  1208. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/sgi.h +10 -9
  1209. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stdcpp3.h +12 -11
  1210. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stlport.h +13 -12
  1211. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/vacpp.h +9 -8
  1212. data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +97 -35
  1213. data/src/cxx_supportlib/vendor-modified/boost/predef/os.h +0 -1
  1214. data/src/cxx_supportlib/vendor-modified/boost/predef/os/aix.h +14 -13
  1215. data/src/cxx_supportlib/vendor-modified/boost/predef/os/amigaos.h +10 -9
  1216. data/src/cxx_supportlib/vendor-modified/boost/predef/os/beos.h +9 -8
  1217. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd.h +22 -23
  1218. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/bsdi.h +9 -8
  1219. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/dragonfly.h +9 -8
  1220. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/free.h +10 -9
  1221. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/net.h +16 -15
  1222. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/open.h +59 -58
  1223. data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +10 -9
  1224. data/src/cxx_supportlib/vendor-modified/boost/predef/os/haiku.h +9 -8
  1225. data/src/cxx_supportlib/vendor-modified/boost/predef/os/hpux.h +11 -10
  1226. data/src/cxx_supportlib/vendor-modified/boost/predef/os/ios.h +12 -11
  1227. data/src/cxx_supportlib/vendor-modified/boost/predef/os/irix.h +10 -9
  1228. data/src/cxx_supportlib/vendor-modified/boost/predef/os/linux.h +14 -10
  1229. data/src/cxx_supportlib/vendor-modified/boost/predef/os/macos.h +14 -13
  1230. data/src/cxx_supportlib/vendor-modified/boost/predef/os/os400.h +9 -8
  1231. data/src/cxx_supportlib/vendor-modified/boost/predef/os/qnxnto.h +12 -11
  1232. data/src/cxx_supportlib/vendor-modified/boost/predef/os/solaris.h +10 -9
  1233. data/src/cxx_supportlib/vendor-modified/boost/predef/os/unix.h +24 -22
  1234. data/src/cxx_supportlib/vendor-modified/boost/predef/os/vms.h +11 -10
  1235. data/src/cxx_supportlib/vendor-modified/boost/predef/os/windows.h +16 -15
  1236. data/src/cxx_supportlib/vendor-modified/boost/predef/other/endian.h +12 -11
  1237. data/src/cxx_supportlib/vendor-modified/boost/predef/other/workaround.h +22 -14
  1238. data/src/cxx_supportlib/vendor-modified/boost/predef/platform.h +1 -0
  1239. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/android.h +44 -0
  1240. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/cloudabi.h +9 -8
  1241. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/ios.h +14 -9
  1242. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw.h +12 -11
  1243. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw32.h +10 -9
  1244. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw64.h +10 -9
  1245. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_desktop.h +10 -9
  1246. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_phone.h +9 -8
  1247. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_runtime.h +10 -9
  1248. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_server.h +9 -8
  1249. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_store.h +10 -9
  1250. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_system.h +9 -8
  1251. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_uwp.h +12 -11
  1252. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
  1253. data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +16 -14
  1254. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/detail/get_data.hpp +20 -20
  1255. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_list.hpp +7 -7
  1256. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_seq.hpp +7 -7
  1257. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_tuple.hpp +7 -7
  1258. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +2 -2
  1259. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities.hpp +2 -0
  1260. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/check_empty.hpp +19 -0
  1261. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/detail/is_empty.hpp +3 -3
  1262. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_variadic.hpp +28 -1
  1263. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/va_opt.hpp +34 -0
  1264. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_array.hpp +16 -16
  1265. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_tuple.hpp +14 -14
  1266. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/for.hpp +7 -7
  1267. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +3 -3
  1268. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/is_empty.hpp +11 -11
  1269. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each.hpp +27 -27
  1270. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each_i.hpp +28 -28
  1271. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/replace.hpp +7 -7
  1272. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/rest_n.hpp +9 -9
  1273. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/detail/is_single_return.hpp +3 -3
  1274. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/elem.hpp +4 -4
  1275. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/insert.hpp +2 -2
  1276. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_back.hpp +16 -16
  1277. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_front.hpp +16 -16
  1278. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_back.hpp +1 -1
  1279. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_front.hpp +1 -1
  1280. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/rem.hpp +10 -10
  1281. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/remove.hpp +16 -16
  1282. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/replace.hpp +2 -2
  1283. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/reverse.hpp +2 -2
  1284. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_list.hpp +2 -2
  1285. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_seq.hpp +2 -2
  1286. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic.hpp +1 -0
  1287. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/has_opt.hpp +39 -0
  1288. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/is_single_return.hpp +3 -3
  1289. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +28 -0
  1290. data/src/cxx_supportlib/vendor-modified/boost/random/detail/integer_log2.hpp +1 -1
  1291. data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +4 -0
  1292. data/src/cxx_supportlib/vendor-modified/boost/range/as_literal.hpp +0 -6
  1293. data/src/cxx_supportlib/vendor-modified/boost/range/begin.hpp +4 -10
  1294. data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +1 -1
  1295. data/src/cxx_supportlib/vendor-modified/boost/range/config.hpp +1 -1
  1296. data/src/cxx_supportlib/vendor-modified/boost/range/end.hpp +4 -10
  1297. data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +0 -32
  1298. data/src/cxx_supportlib/vendor-modified/boost/range/rbegin.hpp +0 -13
  1299. data/src/cxx_supportlib/vendor-modified/boost/range/rend.hpp +0 -13
  1300. data/src/cxx_supportlib/vendor-modified/boost/range/size.hpp +1 -1
  1301. data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +33 -7
  1302. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +11 -2
  1303. data/src/cxx_supportlib/vendor-modified/boost/regex/config/borland.hpp +1 -1
  1304. data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +4 -1
  1305. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/object_cache.hpp +7 -0
  1306. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +17 -6
  1307. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +27 -5
  1308. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +36 -15
  1309. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +4 -4
  1310. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +1 -1
  1311. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +105 -0
  1312. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp +54 -0
  1313. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +1 -1
  1314. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +13 -1
  1315. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +1 -1
  1316. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +26 -16
  1317. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +16 -6
  1318. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +11 -11
  1319. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +6 -6
  1320. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +7 -0
  1321. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +2 -0
  1322. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +7 -7
  1323. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +1 -1
  1324. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +3 -3
  1325. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/sub_match.hpp +1 -1
  1326. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +1 -1
  1327. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +3 -3
  1328. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +92 -388
  1329. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +5 -5
  1330. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +8 -4
  1331. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc.hpp +7 -0
  1332. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +63 -0
  1333. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +11 -0
  1334. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_nt.hpp +7 -0
  1335. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_pt.hpp +7 -0
  1336. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_spin.hpp +7 -0
  1337. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +8 -1
  1338. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_sync.hpp +13 -2
  1339. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_counted_base.hpp +6 -6
  1340. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_sp_deleter.hpp +3 -3
  1341. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +87 -47
  1342. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_convertible.hpp +1 -1
  1343. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +12 -16
  1344. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +13 -3
  1345. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_aix.hpp +10 -3
  1346. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +13 -3
  1347. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +148 -0
  1348. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +13 -3
  1349. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +13 -3
  1350. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +13 -3
  1351. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +13 -3
  1352. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +13 -3
  1353. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +25 -16
  1354. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +16 -8
  1355. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +14 -4
  1356. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_spin.hpp +10 -3
  1357. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +25 -17
  1358. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_sync.hpp +10 -3
  1359. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +13 -3
  1360. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +23 -26
  1361. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +27 -0
  1362. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +69 -0
  1363. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp +51 -0
  1364. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_sleep.hpp +104 -0
  1365. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_typeinfo_.hpp +58 -0
  1366. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +7 -9
  1367. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +7 -0
  1368. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp +85 -0
  1369. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_nt.hpp +7 -0
  1370. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_pt.hpp +7 -0
  1371. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_std_atomic.hpp +13 -5
  1372. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_sync.hpp +8 -1
  1373. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +14 -146
  1374. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +47 -1
  1375. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +22 -22
  1376. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +1 -1
  1377. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +1 -1
  1378. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +1 -1
  1379. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +3 -3
  1380. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +58 -23
  1381. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +79 -8
  1382. data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +2 -2
  1383. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +5 -11
  1384. data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_interoperability.hpp +57 -16
  1385. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +32 -16
  1386. data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +1 -1
  1387. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_adaptor.hpp +1 -1
  1388. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_base.hpp +1 -1
  1389. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +9 -21
  1390. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +9 -21
  1391. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_adaptor.hpp +1 -1
  1392. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_base.hpp +1 -1
  1393. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_op_status.hpp +3 -1
  1394. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_bounded_queue.hpp +1 -1
  1395. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_deque.hpp +3 -3
  1396. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_priority_queue.hpp +4 -4
  1397. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_queue.hpp +3 -3
  1398. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +80 -14
  1399. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/queue.hpp +2 -1
  1400. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +11 -2
  1401. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoke.hpp +16 -17
  1402. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/platform_time.hpp +8 -8
  1403. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +4 -11
  1404. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp.orig +841 -0
  1405. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/basic_thread_pool.hpp +3 -0
  1406. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +2 -0
  1407. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor_adaptor.hpp +2 -0
  1408. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +2 -0
  1409. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/inline_executor.hpp +8 -0
  1410. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +4 -0
  1411. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduled_thread_pool.hpp +4 -0
  1412. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduler.hpp +2 -0
  1413. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduling_adaptor.hpp +3 -0
  1414. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor.hpp +4 -0
  1415. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor_cont.hpp +9 -2
  1416. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/thread_executor.hpp +6 -0
  1417. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/work.hpp +3 -1
  1418. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +6 -2
  1419. data/src/cxx_supportlib/vendor-modified/boost/thread/externally_locked.hpp +1 -0
  1420. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +2 -1
  1421. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_any.hpp +1 -0
  1422. data/src/cxx_supportlib/vendor-modified/boost/thread/interruption.hpp +22 -0
  1423. data/src/cxx_supportlib/vendor-modified/boost/thread/once.hpp.orig +54 -0
  1424. data/src/cxx_supportlib/vendor-modified/boost/thread/poly_lockable.hpp +7 -2
  1425. data/src/cxx_supportlib/vendor-modified/boost/thread/poly_shared_lockable.hpp +16 -12
  1426. data/src/cxx_supportlib/vendor-modified/boost/thread/poly_shared_lockable_adapter.hpp +3 -4
  1427. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +18 -24
  1428. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +6 -13
  1429. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/mutex.hpp +11 -37
  1430. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +29 -28
  1431. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +1 -1
  1432. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_helpers.hpp +163 -18
  1433. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_mutex_scoped_lock.hpp +1 -69
  1434. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/recursive_mutex.hpp +19 -19
  1435. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +1 -1
  1436. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +9 -6
  1437. data/src/cxx_supportlib/vendor-modified/boost/thread/tss.hpp +23 -41
  1438. data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +3 -0
  1439. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +1 -1
  1440. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +138 -59
  1441. data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +15 -11
  1442. data/src/cxx_supportlib/vendor-modified/boost/tuple/tuple.hpp +51 -0
  1443. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +1 -1
  1444. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +1 -1
  1445. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +1 -1
  1446. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_pointer.hpp +1 -1
  1447. data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +1 -1
  1448. data/src/cxx_supportlib/vendor-modified/boost/type_traits/alignment_of.hpp +3 -3
  1449. data/src/cxx_supportlib/vendor-modified/boost/type_traits/conjunction.hpp +40 -0
  1450. data/src/cxx_supportlib/vendor-modified/boost/type_traits/copy_cv_ref.hpp +31 -0
  1451. data/src/cxx_supportlib/vendor-modified/boost/type_traits/copy_reference.hpp +35 -0
  1452. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/config.hpp +25 -4
  1453. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_binary_operator.hpp +6 -6
  1454. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_postfix_operator.hpp +6 -6
  1455. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_prefix_operator.hpp +6 -6
  1456. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_cxx_03.hpp +3 -3
  1457. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_cxx_11.hpp +102 -6
  1458. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_tester.hpp +415 -255
  1459. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_likely_lambda.hpp +2 -1
  1460. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +1345 -1542
  1461. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp +4 -4
  1462. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +143 -28
  1463. data/src/cxx_supportlib/vendor-modified/boost/type_traits/disjunction.hpp +40 -0
  1464. data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +2 -2
  1465. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus.hpp +6 -6
  1466. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus_assign.hpp +6 -6
  1467. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_copy.hpp +1 -1
  1468. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus_assign.hpp +6 -6
  1469. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +1 -1
  1470. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_promotion.hpp +2 -2
  1471. data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +1 -1
  1472. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +2 -2
  1473. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_and_derived.hpp +2 -2
  1474. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_bounded_array.hpp +42 -0
  1475. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complete.hpp +1 -1
  1476. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_compound.hpp +1 -1
  1477. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +1 -1
  1478. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_constructible.hpp +1 -1
  1479. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_convertible.hpp +3 -3
  1480. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +1 -1
  1481. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +1 -1
  1482. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_empty.hpp +3 -3
  1483. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_enum.hpp +4 -4
  1484. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_fundamental.hpp +1 -1
  1485. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +3 -3
  1486. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_lvalue_reference.hpp +1 -1
  1487. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_pointer.hpp +1 -1
  1488. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pointer.hpp +1 -1
  1489. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_same.hpp +1 -1
  1490. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_scoped_enum.hpp +26 -0
  1491. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_signed.hpp +2 -2
  1492. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_trivially_copyable.hpp +27 -0
  1493. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_unbounded_array.hpp +41 -0
  1494. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_unscoped_enum.hpp +25 -0
  1495. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_unsigned.hpp +2 -2
  1496. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +2 -2
  1497. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +1 -1
  1498. data/src/cxx_supportlib/vendor-modified/boost/type_traits/negation.hpp +23 -0
  1499. data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +4 -4
  1500. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +1 -1
  1501. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +1 -1
  1502. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +1 -1
  1503. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +1 -1
  1504. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +1 -1
  1505. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +2 -2
  1506. data/src/cxx_supportlib/vendor-modified/boost/typeof/int_encoding.hpp +1 -0
  1507. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +1 -0
  1508. data/src/cxx_supportlib/vendor-modified/boost/utility/detail/result_of_iterate.hpp +3 -3
  1509. data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +3 -42
  1510. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +4 -43
  1511. data/src/cxx_supportlib/vendor-modified/boost/utility/value_init.hpp +29 -67
  1512. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  1513. data/src/nginx_module/Configuration.c +3 -3
  1514. data/src/nginx_module/config +2 -0
  1515. data/src/nginx_module/ngx_http_passenger_module.c +2 -2
  1516. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  1517. data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +1 -1
  1518. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +4 -1
  1519. data/src/ruby_supportlib/phusion_passenger/common_library.rb +2 -0
  1520. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +1 -1
  1521. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +1 -1
  1522. data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -1
  1523. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +17 -9
  1524. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +1 -3
  1525. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +3 -0
  1526. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -1
  1527. metadata +302 -70
  1528. data/src/cxx_supportlib/vendor-modified/boost/asio/datagram_socket_service.hpp +0 -468
  1529. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer_service.hpp +0 -175
  1530. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental.hpp +0 -22
  1531. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +0 -228
  1532. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detached.hpp +0 -67
  1533. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_spawn.hpp +0 -878
  1534. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/detached.hpp +0 -93
  1535. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_type.hpp +0 -52
  1536. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_service.hpp +0 -202
  1537. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor_service.hpp +0 -281
  1538. data/src/cxx_supportlib/vendor-modified/boost/asio/raw_socket_service.hpp +0 -468
  1539. data/src/cxx_supportlib/vendor-modified/boost/asio/seq_packet_socket_service.hpp +0 -418
  1540. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_service.hpp +0 -251
  1541. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_service.hpp +0 -144
  1542. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_acceptor_service.hpp +0 -374
  1543. data/src/cxx_supportlib/vendor-modified/boost/asio/stream_socket_service.hpp +0 -414
  1544. data/src/cxx_supportlib/vendor-modified/boost/asio/waitable_timer_service.hpp +0 -212
  1545. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_handle.hpp +0 -275
  1546. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle_service.hpp +0 -185
  1547. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle_service.hpp +0 -216
  1548. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle_service.hpp +0 -212
  1549. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag.hpp +0 -71
  1550. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_arm.hpp +0 -39
  1551. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_ppc.hpp +0 -37
  1552. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +0 -40
  1553. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lockpool.hpp +0 -51
  1554. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations.hpp +0 -24
  1555. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_fwd.hpp +0 -35
  1556. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_lockfree.hpp +0 -30
  1557. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +0 -162
  1558. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +0 -392
  1559. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +0 -563
  1560. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_type.hpp +0 -207
  1561. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/allocators.hpp +0 -89
  1562. data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +0 -21
  1563. data/src/cxx_supportlib/vendor-modified/boost/detail/endian.hpp +0 -11
  1564. data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +0 -39
  1565. data/src/cxx_supportlib/vendor-modified/boost/detail/sp_typeinfo.hpp +0 -36
  1566. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/overloads.hpp +0 -88
  1567. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/endian_compat.h +0 -28
  1568. data/src/cxx_supportlib/vendor-modified/boost/predef/os/android.h +0 -45
  1569. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_solaris.hpp +0 -59
  1570. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +0 -151
  1571. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp +0 -161
  1572. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_solaris.hpp +0 -116
  1573. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync.hpp +0 -69
@@ -2,7 +2,7 @@
2
2
  // impl/read_until.hpp
3
3
  // ~~~~~~~~~~~~~~~~~~~
4
4
  //
5
- // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
5
+ // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
6
  //
7
7
  // Distributed under the Boost Software License, Version 1.0. (See accompanying
8
8
  // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -27,8 +27,10 @@
27
27
  #include <boost/asio/detail/handler_alloc_helpers.hpp>
28
28
  #include <boost/asio/detail/handler_cont_helpers.hpp>
29
29
  #include <boost/asio/detail/handler_invoke_helpers.hpp>
30
+ #include <boost/asio/detail/handler_tracking.hpp>
30
31
  #include <boost/asio/detail/handler_type_requirements.hpp>
31
32
  #include <boost/asio/detail/limits.hpp>
33
+ #include <boost/asio/detail/non_const_lvalue.hpp>
32
34
  #include <boost/asio/detail/throw_error.hpp>
33
35
 
34
36
  #include <boost/asio/detail/push_options.hpp>
@@ -36,30 +38,75 @@
36
38
  namespace boost {
37
39
  namespace asio {
38
40
 
39
- template <typename SyncReadStream, typename DynamicBuffer>
41
+ namespace detail
42
+ {
43
+ // Algorithm that finds a subsequence of equal values in a sequence. Returns
44
+ // (iterator,true) if a full match was found, in which case the iterator
45
+ // points to the beginning of the match. Returns (iterator,false) if a
46
+ // partial match was found at the end of the first sequence, in which case
47
+ // the iterator points to the beginning of the partial match. Returns
48
+ // (last1,false) if no full or partial match was found.
49
+ template <typename Iterator1, typename Iterator2>
50
+ std::pair<Iterator1, bool> partial_search(
51
+ Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
52
+ {
53
+ for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
54
+ {
55
+ Iterator1 test_iter1 = iter1;
56
+ Iterator2 test_iter2 = first2;
57
+ for (;; ++test_iter1, ++test_iter2)
58
+ {
59
+ if (test_iter2 == last2)
60
+ return std::make_pair(iter1, true);
61
+ if (test_iter1 == last1)
62
+ {
63
+ if (test_iter2 != first2)
64
+ return std::make_pair(iter1, false);
65
+ else
66
+ break;
67
+ }
68
+ if (*test_iter1 != *test_iter2)
69
+ break;
70
+ }
71
+ }
72
+ return std::make_pair(last1, false);
73
+ }
74
+ } // namespace detail
75
+
76
+ #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
77
+
78
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
40
79
  inline std::size_t read_until(SyncReadStream& s,
41
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
80
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
81
+ typename enable_if<
82
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
83
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
84
+ >::type*)
42
85
  {
43
86
  boost::system::error_code ec;
44
87
  std::size_t bytes_transferred = read_until(s,
45
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
88
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
46
89
  boost::asio::detail::throw_error(ec, "read_until");
47
90
  return bytes_transferred;
48
91
  }
49
92
 
50
- template <typename SyncReadStream, typename DynamicBuffer>
93
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
51
94
  std::size_t read_until(SyncReadStream& s,
52
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
53
- char delim, boost::system::error_code& ec)
95
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
96
+ char delim, boost::system::error_code& ec,
97
+ typename enable_if<
98
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
99
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
100
+ >::type*)
54
101
  {
55
- typename decay<DynamicBuffer>::type b(
56
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
102
+ typename decay<DynamicBuffer_v1>::type b(
103
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
57
104
 
58
105
  std::size_t search_position = 0;
59
106
  for (;;)
60
107
  {
61
108
  // Determine the range of the data to be searched.
62
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
109
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
63
110
  typedef buffers_iterator<buffers_type> iterator;
64
111
  buffers_type data_buffers = b.data();
65
112
  iterator begin = iterator::begin(data_buffers);
@@ -97,66 +144,39 @@ std::size_t read_until(SyncReadStream& s,
97
144
  }
98
145
  }
99
146
 
100
- template <typename SyncReadStream, typename DynamicBuffer>
147
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
101
148
  inline std::size_t read_until(SyncReadStream& s,
102
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
103
- BOOST_ASIO_STRING_VIEW_PARAM delim)
149
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
150
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
151
+ typename enable_if<
152
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
153
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
154
+ >::type*)
104
155
  {
105
156
  boost::system::error_code ec;
106
157
  std::size_t bytes_transferred = read_until(s,
107
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
158
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
108
159
  boost::asio::detail::throw_error(ec, "read_until");
109
160
  return bytes_transferred;
110
161
  }
111
162
 
112
- namespace detail
113
- {
114
- // Algorithm that finds a subsequence of equal values in a sequence. Returns
115
- // (iterator,true) if a full match was found, in which case the iterator
116
- // points to the beginning of the match. Returns (iterator,false) if a
117
- // partial match was found at the end of the first sequence, in which case
118
- // the iterator points to the beginning of the partial match. Returns
119
- // (last1,false) if no full or partial match was found.
120
- template <typename Iterator1, typename Iterator2>
121
- std::pair<Iterator1, bool> partial_search(
122
- Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
123
- {
124
- for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
125
- {
126
- Iterator1 test_iter1 = iter1;
127
- Iterator2 test_iter2 = first2;
128
- for (;; ++test_iter1, ++test_iter2)
129
- {
130
- if (test_iter2 == last2)
131
- return std::make_pair(iter1, true);
132
- if (test_iter1 == last1)
133
- {
134
- if (test_iter2 != first2)
135
- return std::make_pair(iter1, false);
136
- else
137
- break;
138
- }
139
- if (*test_iter1 != *test_iter2)
140
- break;
141
- }
142
- }
143
- return std::make_pair(last1, false);
144
- }
145
- } // namespace detail
146
-
147
- template <typename SyncReadStream, typename DynamicBuffer>
163
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
148
164
  std::size_t read_until(SyncReadStream& s,
149
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
150
- BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
165
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
166
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec,
167
+ typename enable_if<
168
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
169
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
170
+ >::type*)
151
171
  {
152
- typename decay<DynamicBuffer>::type b(
153
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
172
+ typename decay<DynamicBuffer_v1>::type b(
173
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
154
174
 
155
175
  std::size_t search_position = 0;
156
176
  for (;;)
157
177
  {
158
178
  // Determine the range of the data to be searched.
159
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
179
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
160
180
  typedef buffers_iterator<buffers_type> iterator;
161
181
  buffers_type data_buffers = b.data();
162
182
  iterator begin = iterator::begin(data_buffers);
@@ -206,31 +226,39 @@ std::size_t read_until(SyncReadStream& s,
206
226
  #if !defined(BOOST_ASIO_NO_EXTENSIONS)
207
227
  #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
208
228
 
209
- template <typename SyncReadStream, typename DynamicBuffer>
229
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
210
230
  inline std::size_t read_until(SyncReadStream& s,
211
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
212
- const boost::regex& expr)
231
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
232
+ const boost::regex& expr,
233
+ typename enable_if<
234
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
235
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
236
+ >::type*)
213
237
  {
214
238
  boost::system::error_code ec;
215
239
  std::size_t bytes_transferred = read_until(s,
216
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
240
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr, ec);
217
241
  boost::asio::detail::throw_error(ec, "read_until");
218
242
  return bytes_transferred;
219
243
  }
220
244
 
221
- template <typename SyncReadStream, typename DynamicBuffer>
245
+ template <typename SyncReadStream, typename DynamicBuffer_v1>
222
246
  std::size_t read_until(SyncReadStream& s,
223
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
224
- const boost::regex& expr, boost::system::error_code& ec)
247
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
248
+ const boost::regex& expr, boost::system::error_code& ec,
249
+ typename enable_if<
250
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
251
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
252
+ >::type*)
225
253
  {
226
- typename decay<DynamicBuffer>::type b(
227
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
254
+ typename decay<DynamicBuffer_v1>::type b(
255
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
228
256
 
229
257
  std::size_t search_position = 0;
230
258
  for (;;)
231
259
  {
232
260
  // Determine the range of the data to be searched.
233
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
261
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
234
262
  typedef buffers_iterator<buffers_type> iterator;
235
263
  buffers_type data_buffers = b.data();
236
264
  iterator begin = iterator::begin(data_buffers);
@@ -282,35 +310,43 @@ std::size_t read_until(SyncReadStream& s,
282
310
  #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
283
311
 
284
312
  template <typename SyncReadStream,
285
- typename DynamicBuffer, typename MatchCondition>
313
+ typename DynamicBuffer_v1, typename MatchCondition>
286
314
  inline std::size_t read_until(SyncReadStream& s,
287
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
315
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
288
316
  MatchCondition match_condition,
289
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
317
+ typename enable_if<
318
+ is_match_condition<MatchCondition>::value
319
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
320
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
321
+ >::type*)
290
322
  {
291
323
  boost::system::error_code ec;
292
324
  std::size_t bytes_transferred = read_until(s,
293
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
325
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
294
326
  match_condition, ec);
295
327
  boost::asio::detail::throw_error(ec, "read_until");
296
328
  return bytes_transferred;
297
329
  }
298
330
 
299
331
  template <typename SyncReadStream,
300
- typename DynamicBuffer, typename MatchCondition>
332
+ typename DynamicBuffer_v1, typename MatchCondition>
301
333
  std::size_t read_until(SyncReadStream& s,
302
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
334
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
303
335
  MatchCondition match_condition, boost::system::error_code& ec,
304
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
336
+ typename enable_if<
337
+ is_match_condition<MatchCondition>::value
338
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
339
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
340
+ >::type*)
305
341
  {
306
- typename decay<DynamicBuffer>::type b(
307
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
342
+ typename decay<DynamicBuffer_v1>::type b(
343
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
308
344
 
309
345
  std::size_t search_position = 0;
310
346
  for (;;)
311
347
  {
312
348
  // Determine the range of the data to be searched.
313
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
349
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
314
350
  typedef buffers_iterator<buffers_type> iterator;
315
351
  buffers_type data_buffers = b.data();
316
352
  iterator begin = iterator::begin(data_buffers);
@@ -343,97 +379,1708 @@ std::size_t read_until(SyncReadStream& s,
343
379
  return 0;
344
380
  }
345
381
 
346
- // Need more data.
347
- std::size_t bytes_to_read = std::min<std::size_t>(
348
- std::max<std::size_t>(512, b.capacity() - b.size()),
349
- std::min<std::size_t>(65536, b.max_size() - b.size()));
350
- b.commit(s.read_some(b.prepare(bytes_to_read), ec));
351
- if (ec)
352
- return 0;
382
+ // Need more data.
383
+ std::size_t bytes_to_read = std::min<std::size_t>(
384
+ std::max<std::size_t>(512, b.capacity() - b.size()),
385
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
386
+ b.commit(s.read_some(b.prepare(bytes_to_read), ec));
387
+ if (ec)
388
+ return 0;
389
+ }
390
+ }
391
+
392
+ #if !defined(BOOST_ASIO_NO_IOSTREAM)
393
+
394
+ template <typename SyncReadStream, typename Allocator>
395
+ inline std::size_t read_until(SyncReadStream& s,
396
+ boost::asio::basic_streambuf<Allocator>& b, char delim)
397
+ {
398
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
399
+ }
400
+
401
+ template <typename SyncReadStream, typename Allocator>
402
+ inline std::size_t read_until(SyncReadStream& s,
403
+ boost::asio::basic_streambuf<Allocator>& b, char delim,
404
+ boost::system::error_code& ec)
405
+ {
406
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
407
+ }
408
+
409
+ template <typename SyncReadStream, typename Allocator>
410
+ inline std::size_t read_until(SyncReadStream& s,
411
+ boost::asio::basic_streambuf<Allocator>& b,
412
+ BOOST_ASIO_STRING_VIEW_PARAM delim)
413
+ {
414
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
415
+ }
416
+
417
+ template <typename SyncReadStream, typename Allocator>
418
+ inline std::size_t read_until(SyncReadStream& s,
419
+ boost::asio::basic_streambuf<Allocator>& b,
420
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
421
+ {
422
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
423
+ }
424
+
425
+ #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
426
+
427
+ template <typename SyncReadStream, typename Allocator>
428
+ inline std::size_t read_until(SyncReadStream& s,
429
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
430
+ {
431
+ return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
432
+ }
433
+
434
+ template <typename SyncReadStream, typename Allocator>
435
+ inline std::size_t read_until(SyncReadStream& s,
436
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
437
+ boost::system::error_code& ec)
438
+ {
439
+ return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
440
+ }
441
+
442
+ #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
443
+
444
+ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
445
+ inline std::size_t read_until(SyncReadStream& s,
446
+ boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
447
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
448
+ {
449
+ return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
450
+ }
451
+
452
+ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
453
+ inline std::size_t read_until(SyncReadStream& s,
454
+ boost::asio::basic_streambuf<Allocator>& b,
455
+ MatchCondition match_condition, boost::system::error_code& ec,
456
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
457
+ {
458
+ return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
459
+ }
460
+
461
+ #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
462
+ #endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
463
+ #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
464
+
465
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
466
+ inline std::size_t read_until(SyncReadStream& s,
467
+ DynamicBuffer_v2 buffers, char delim,
468
+ typename enable_if<
469
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
470
+ >::type*)
471
+ {
472
+ boost::system::error_code ec;
473
+ std::size_t bytes_transferred = read_until(s,
474
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
475
+ boost::asio::detail::throw_error(ec, "read_until");
476
+ return bytes_transferred;
477
+ }
478
+
479
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
480
+ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
481
+ char delim, boost::system::error_code& ec,
482
+ typename enable_if<
483
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
484
+ >::type*)
485
+ {
486
+ DynamicBuffer_v2& b = buffers;
487
+
488
+ std::size_t search_position = 0;
489
+ for (;;)
490
+ {
491
+ // Determine the range of the data to be searched.
492
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
493
+ typedef buffers_iterator<buffers_type> iterator;
494
+ buffers_type data_buffers =
495
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
496
+ iterator begin = iterator::begin(data_buffers);
497
+ iterator start_pos = begin + search_position;
498
+ iterator end = iterator::end(data_buffers);
499
+
500
+ // Look for a match.
501
+ iterator iter = std::find(start_pos, end, delim);
502
+ if (iter != end)
503
+ {
504
+ // Found a match. We're done.
505
+ ec = boost::system::error_code();
506
+ return iter - begin + 1;
507
+ }
508
+ else
509
+ {
510
+ // No match. Next search can start with the new data.
511
+ search_position = end - begin;
512
+ }
513
+
514
+ // Check if buffer is full.
515
+ if (b.size() == b.max_size())
516
+ {
517
+ ec = error::not_found;
518
+ return 0;
519
+ }
520
+
521
+ // Need more data.
522
+ std::size_t bytes_to_read = std::min<std::size_t>(
523
+ std::max<std::size_t>(512, b.capacity() - b.size()),
524
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
525
+ std::size_t pos = b.size();
526
+ b.grow(bytes_to_read);
527
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
528
+ b.shrink(bytes_to_read - bytes_transferred);
529
+ if (ec)
530
+ return 0;
531
+ }
532
+ }
533
+
534
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
535
+ inline std::size_t read_until(SyncReadStream& s,
536
+ DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim,
537
+ typename enable_if<
538
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
539
+ >::type*)
540
+ {
541
+ boost::system::error_code ec;
542
+ std::size_t bytes_transferred = read_until(s,
543
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
544
+ boost::asio::detail::throw_error(ec, "read_until");
545
+ return bytes_transferred;
546
+ }
547
+
548
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
549
+ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
550
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec,
551
+ typename enable_if<
552
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
553
+ >::type*)
554
+ {
555
+ DynamicBuffer_v2& b = buffers;
556
+
557
+ std::size_t search_position = 0;
558
+ for (;;)
559
+ {
560
+ // Determine the range of the data to be searched.
561
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
562
+ typedef buffers_iterator<buffers_type> iterator;
563
+ buffers_type data_buffers =
564
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
565
+ iterator begin = iterator::begin(data_buffers);
566
+ iterator start_pos = begin + search_position;
567
+ iterator end = iterator::end(data_buffers);
568
+
569
+ // Look for a match.
570
+ std::pair<iterator, bool> result = detail::partial_search(
571
+ start_pos, end, delim.begin(), delim.end());
572
+ if (result.first != end)
573
+ {
574
+ if (result.second)
575
+ {
576
+ // Full match. We're done.
577
+ ec = boost::system::error_code();
578
+ return result.first - begin + delim.length();
579
+ }
580
+ else
581
+ {
582
+ // Partial match. Next search needs to start from beginning of match.
583
+ search_position = result.first - begin;
584
+ }
585
+ }
586
+ else
587
+ {
588
+ // No match. Next search can start with the new data.
589
+ search_position = end - begin;
590
+ }
591
+
592
+ // Check if buffer is full.
593
+ if (b.size() == b.max_size())
594
+ {
595
+ ec = error::not_found;
596
+ return 0;
597
+ }
598
+
599
+ // Need more data.
600
+ std::size_t bytes_to_read = std::min<std::size_t>(
601
+ std::max<std::size_t>(512, b.capacity() - b.size()),
602
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
603
+ std::size_t pos = b.size();
604
+ b.grow(bytes_to_read);
605
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
606
+ b.shrink(bytes_to_read - bytes_transferred);
607
+ if (ec)
608
+ return 0;
609
+ }
610
+ }
611
+
612
+ #if !defined(BOOST_ASIO_NO_EXTENSIONS)
613
+ #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
614
+
615
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
616
+ inline std::size_t read_until(SyncReadStream& s,
617
+ DynamicBuffer_v2 buffers, const boost::regex& expr,
618
+ typename enable_if<
619
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
620
+ >::type*)
621
+ {
622
+ boost::system::error_code ec;
623
+ std::size_t bytes_transferred = read_until(s,
624
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr, ec);
625
+ boost::asio::detail::throw_error(ec, "read_until");
626
+ return bytes_transferred;
627
+ }
628
+
629
+ template <typename SyncReadStream, typename DynamicBuffer_v2>
630
+ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
631
+ const boost::regex& expr, boost::system::error_code& ec,
632
+ typename enable_if<
633
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
634
+ >::type*)
635
+ {
636
+ DynamicBuffer_v2& b = buffers;
637
+
638
+ std::size_t search_position = 0;
639
+ for (;;)
640
+ {
641
+ // Determine the range of the data to be searched.
642
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
643
+ typedef buffers_iterator<buffers_type> iterator;
644
+ buffers_type data_buffers =
645
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
646
+ iterator begin = iterator::begin(data_buffers);
647
+ iterator start_pos = begin + search_position;
648
+ iterator end = iterator::end(data_buffers);
649
+
650
+ // Look for a match.
651
+ boost::match_results<iterator,
652
+ typename std::vector<boost::sub_match<iterator> >::allocator_type>
653
+ match_results;
654
+ if (regex_search(start_pos, end, match_results, expr,
655
+ boost::match_default | boost::match_partial))
656
+ {
657
+ if (match_results[0].matched)
658
+ {
659
+ // Full match. We're done.
660
+ ec = boost::system::error_code();
661
+ return match_results[0].second - begin;
662
+ }
663
+ else
664
+ {
665
+ // Partial match. Next search needs to start from beginning of match.
666
+ search_position = match_results[0].first - begin;
667
+ }
668
+ }
669
+ else
670
+ {
671
+ // No match. Next search can start with the new data.
672
+ search_position = end - begin;
673
+ }
674
+
675
+ // Check if buffer is full.
676
+ if (b.size() == b.max_size())
677
+ {
678
+ ec = error::not_found;
679
+ return 0;
680
+ }
681
+
682
+ // Need more data.
683
+ std::size_t bytes_to_read = std::min<std::size_t>(
684
+ std::max<std::size_t>(512, b.capacity() - b.size()),
685
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
686
+ std::size_t pos = b.size();
687
+ b.grow(bytes_to_read);
688
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
689
+ b.shrink(bytes_to_read - bytes_transferred);
690
+ if (ec)
691
+ return 0;
692
+ }
693
+ }
694
+
695
+ #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
696
+
697
+ template <typename SyncReadStream,
698
+ typename DynamicBuffer_v2, typename MatchCondition>
699
+ inline std::size_t read_until(SyncReadStream& s,
700
+ DynamicBuffer_v2 buffers, MatchCondition match_condition,
701
+ typename enable_if<
702
+ is_match_condition<MatchCondition>::value
703
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
704
+ >::type*)
705
+ {
706
+ boost::system::error_code ec;
707
+ std::size_t bytes_transferred = read_until(s,
708
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
709
+ match_condition, ec);
710
+ boost::asio::detail::throw_error(ec, "read_until");
711
+ return bytes_transferred;
712
+ }
713
+
714
+ template <typename SyncReadStream,
715
+ typename DynamicBuffer_v2, typename MatchCondition>
716
+ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
717
+ MatchCondition match_condition, boost::system::error_code& ec,
718
+ typename enable_if<
719
+ is_match_condition<MatchCondition>::value
720
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
721
+ >::type*)
722
+ {
723
+ DynamicBuffer_v2& b = buffers;
724
+
725
+ std::size_t search_position = 0;
726
+ for (;;)
727
+ {
728
+ // Determine the range of the data to be searched.
729
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
730
+ typedef buffers_iterator<buffers_type> iterator;
731
+ buffers_type data_buffers =
732
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
733
+ iterator begin = iterator::begin(data_buffers);
734
+ iterator start_pos = begin + search_position;
735
+ iterator end = iterator::end(data_buffers);
736
+
737
+ // Look for a match.
738
+ std::pair<iterator, bool> result = match_condition(start_pos, end);
739
+ if (result.second)
740
+ {
741
+ // Full match. We're done.
742
+ ec = boost::system::error_code();
743
+ return result.first - begin;
744
+ }
745
+ else if (result.first != end)
746
+ {
747
+ // Partial match. Next search needs to start from beginning of match.
748
+ search_position = result.first - begin;
749
+ }
750
+ else
751
+ {
752
+ // No match. Next search can start with the new data.
753
+ search_position = end - begin;
754
+ }
755
+
756
+ // Check if buffer is full.
757
+ if (b.size() == b.max_size())
758
+ {
759
+ ec = error::not_found;
760
+ return 0;
761
+ }
762
+
763
+ // Need more data.
764
+ std::size_t bytes_to_read = std::min<std::size_t>(
765
+ std::max<std::size_t>(512, b.capacity() - b.size()),
766
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
767
+ std::size_t pos = b.size();
768
+ b.grow(bytes_to_read);
769
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
770
+ b.shrink(bytes_to_read - bytes_transferred);
771
+ if (ec)
772
+ return 0;
773
+ }
774
+ }
775
+
776
+ #endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
777
+
778
+ #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
779
+
780
+ namespace detail
781
+ {
782
+ template <typename AsyncReadStream,
783
+ typename DynamicBuffer_v1, typename ReadHandler>
784
+ class read_until_delim_op_v1
785
+ {
786
+ public:
787
+ template <typename BufferSequence>
788
+ read_until_delim_op_v1(AsyncReadStream& stream,
789
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
790
+ char delim, ReadHandler& handler)
791
+ : stream_(stream),
792
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
793
+ delim_(delim),
794
+ start_(0),
795
+ search_position_(0),
796
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
797
+ {
798
+ }
799
+
800
+ #if defined(BOOST_ASIO_HAS_MOVE)
801
+ read_until_delim_op_v1(const read_until_delim_op_v1& other)
802
+ : stream_(other.stream_),
803
+ buffers_(other.buffers_),
804
+ delim_(other.delim_),
805
+ start_(other.start_),
806
+ search_position_(other.search_position_),
807
+ handler_(other.handler_)
808
+ {
809
+ }
810
+
811
+ read_until_delim_op_v1(read_until_delim_op_v1&& other)
812
+ : stream_(other.stream_),
813
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
814
+ delim_(other.delim_),
815
+ start_(other.start_),
816
+ search_position_(other.search_position_),
817
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
818
+ {
819
+ }
820
+ #endif // defined(BOOST_ASIO_HAS_MOVE)
821
+
822
+ void operator()(const boost::system::error_code& ec,
823
+ std::size_t bytes_transferred, int start = 0)
824
+ {
825
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
826
+ std::size_t bytes_to_read;
827
+ switch (start_ = start)
828
+ {
829
+ case 1:
830
+ for (;;)
831
+ {
832
+ {
833
+ // Determine the range of the data to be searched.
834
+ typedef typename DynamicBuffer_v1::const_buffers_type
835
+ buffers_type;
836
+ typedef buffers_iterator<buffers_type> iterator;
837
+ buffers_type data_buffers = buffers_.data();
838
+ iterator begin = iterator::begin(data_buffers);
839
+ iterator start_pos = begin + search_position_;
840
+ iterator end = iterator::end(data_buffers);
841
+
842
+ // Look for a match.
843
+ iterator iter = std::find(start_pos, end, delim_);
844
+ if (iter != end)
845
+ {
846
+ // Found a match. We're done.
847
+ search_position_ = iter - begin + 1;
848
+ bytes_to_read = 0;
849
+ }
850
+
851
+ // No match yet. Check if buffer is full.
852
+ else if (buffers_.size() == buffers_.max_size())
853
+ {
854
+ search_position_ = not_found;
855
+ bytes_to_read = 0;
856
+ }
857
+
858
+ // Need to read some more data.
859
+ else
860
+ {
861
+ // Next search can start with the new data.
862
+ search_position_ = end - begin;
863
+ bytes_to_read = std::min<std::size_t>(
864
+ std::max<std::size_t>(512,
865
+ buffers_.capacity() - buffers_.size()),
866
+ std::min<std::size_t>(65536,
867
+ buffers_.max_size() - buffers_.size()));
868
+ }
869
+ }
870
+
871
+ // Check if we're done.
872
+ if (!start && bytes_to_read == 0)
873
+ break;
874
+
875
+ // Start a new asynchronous read operation to obtain more data.
876
+ {
877
+ BOOST_ASIO_HANDLER_LOCATION((
878
+ __FILE__, __LINE__, "async_read_until"));
879
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
880
+ BOOST_ASIO_MOVE_CAST(read_until_delim_op_v1)(*this));
881
+ }
882
+ return; default:
883
+ buffers_.commit(bytes_transferred);
884
+ if (ec || bytes_transferred == 0)
885
+ break;
886
+ }
887
+
888
+ const boost::system::error_code result_ec =
889
+ (search_position_ == not_found)
890
+ ? error::not_found : ec;
891
+
892
+ const std::size_t result_n =
893
+ (ec || search_position_ == not_found)
894
+ ? 0 : search_position_;
895
+
896
+ handler_(result_ec, result_n);
897
+ }
898
+ }
899
+
900
+ //private:
901
+ AsyncReadStream& stream_;
902
+ DynamicBuffer_v1 buffers_;
903
+ char delim_;
904
+ int start_;
905
+ std::size_t search_position_;
906
+ ReadHandler handler_;
907
+ };
908
+
909
+ template <typename AsyncReadStream,
910
+ typename DynamicBuffer_v1, typename ReadHandler>
911
+ inline asio_handler_allocate_is_deprecated
912
+ asio_handler_allocate(std::size_t size,
913
+ read_until_delim_op_v1<AsyncReadStream,
914
+ DynamicBuffer_v1, ReadHandler>* this_handler)
915
+ {
916
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
917
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
918
+ return asio_handler_allocate_is_no_longer_used();
919
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
920
+ return boost_asio_handler_alloc_helpers::allocate(
921
+ size, this_handler->handler_);
922
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
923
+ }
924
+
925
+ template <typename AsyncReadStream,
926
+ typename DynamicBuffer_v1, typename ReadHandler>
927
+ inline asio_handler_deallocate_is_deprecated
928
+ asio_handler_deallocate(void* pointer, std::size_t size,
929
+ read_until_delim_op_v1<AsyncReadStream,
930
+ DynamicBuffer_v1, ReadHandler>* this_handler)
931
+ {
932
+ boost_asio_handler_alloc_helpers::deallocate(
933
+ pointer, size, this_handler->handler_);
934
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
935
+ return asio_handler_deallocate_is_no_longer_used();
936
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
937
+ }
938
+
939
+ template <typename AsyncReadStream,
940
+ typename DynamicBuffer_v1, typename ReadHandler>
941
+ inline bool asio_handler_is_continuation(
942
+ read_until_delim_op_v1<AsyncReadStream,
943
+ DynamicBuffer_v1, ReadHandler>* this_handler)
944
+ {
945
+ return this_handler->start_ == 0 ? true
946
+ : boost_asio_handler_cont_helpers::is_continuation(
947
+ this_handler->handler_);
948
+ }
949
+
950
+ template <typename Function, typename AsyncReadStream,
951
+ typename DynamicBuffer_v1, typename ReadHandler>
952
+ inline asio_handler_invoke_is_deprecated
953
+ asio_handler_invoke(Function& function,
954
+ read_until_delim_op_v1<AsyncReadStream,
955
+ DynamicBuffer_v1, ReadHandler>* this_handler)
956
+ {
957
+ boost_asio_handler_invoke_helpers::invoke(
958
+ function, this_handler->handler_);
959
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
960
+ return asio_handler_invoke_is_no_longer_used();
961
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
962
+ }
963
+
964
+ template <typename Function, typename AsyncReadStream,
965
+ typename DynamicBuffer_v1, typename ReadHandler>
966
+ inline asio_handler_invoke_is_deprecated
967
+ asio_handler_invoke(const Function& function,
968
+ read_until_delim_op_v1<AsyncReadStream,
969
+ DynamicBuffer_v1, ReadHandler>* this_handler)
970
+ {
971
+ boost_asio_handler_invoke_helpers::invoke(
972
+ function, this_handler->handler_);
973
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
974
+ return asio_handler_invoke_is_no_longer_used();
975
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
976
+ }
977
+
978
+ template <typename AsyncReadStream>
979
+ class initiate_async_read_until_delim_v1
980
+ {
981
+ public:
982
+ typedef typename AsyncReadStream::executor_type executor_type;
983
+
984
+ explicit initiate_async_read_until_delim_v1(AsyncReadStream& stream)
985
+ : stream_(stream)
986
+ {
987
+ }
988
+
989
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
990
+ {
991
+ return stream_.get_executor();
992
+ }
993
+
994
+ template <typename ReadHandler, typename DynamicBuffer_v1>
995
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
996
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
997
+ char delim) const
998
+ {
999
+ // If you get an error on the following line it means that your handler
1000
+ // does not meet the documented type requirements for a ReadHandler.
1001
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1002
+
1003
+ non_const_lvalue<ReadHandler> handler2(handler);
1004
+ read_until_delim_op_v1<AsyncReadStream,
1005
+ typename decay<DynamicBuffer_v1>::type,
1006
+ typename decay<ReadHandler>::type>(
1007
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
1008
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
1009
+ }
1010
+
1011
+ private:
1012
+ AsyncReadStream& stream_;
1013
+ };
1014
+ } // namespace detail
1015
+
1016
+ #if !defined(GENERATING_DOCUMENTATION)
1017
+
1018
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1019
+ typename ReadHandler, typename Allocator>
1020
+ struct associated_allocator<
1021
+ detail::read_until_delim_op_v1<AsyncReadStream,
1022
+ DynamicBuffer_v1, ReadHandler>,
1023
+ Allocator>
1024
+ {
1025
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1026
+
1027
+ static type get(
1028
+ const detail::read_until_delim_op_v1<AsyncReadStream,
1029
+ DynamicBuffer_v1, ReadHandler>& h,
1030
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1031
+ {
1032
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1033
+ }
1034
+ };
1035
+
1036
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1037
+ typename ReadHandler, typename Executor>
1038
+ struct associated_executor<
1039
+ detail::read_until_delim_op_v1<AsyncReadStream,
1040
+ DynamicBuffer_v1, ReadHandler>,
1041
+ Executor>
1042
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1043
+ {
1044
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
1045
+
1046
+ static type get(
1047
+ const detail::read_until_delim_op_v1<AsyncReadStream,
1048
+ DynamicBuffer_v1, ReadHandler>& h,
1049
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1050
+ {
1051
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
1052
+ }
1053
+ };
1054
+
1055
+ #endif // !defined(GENERATING_DOCUMENTATION)
1056
+
1057
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1058
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
1059
+ std::size_t)) ReadHandler>
1060
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1061
+ void (boost::system::error_code, std::size_t))
1062
+ async_read_until(AsyncReadStream& s,
1063
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1064
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1065
+ typename enable_if<
1066
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
1067
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
1068
+ >::type*)
1069
+ {
1070
+ return async_initiate<ReadHandler,
1071
+ void (boost::system::error_code, std::size_t)>(
1072
+ detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
1073
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim);
1074
+ }
1075
+
1076
+ namespace detail
1077
+ {
1078
+ template <typename AsyncReadStream,
1079
+ typename DynamicBuffer_v1, typename ReadHandler>
1080
+ class read_until_delim_string_op_v1
1081
+ {
1082
+ public:
1083
+ template <typename BufferSequence>
1084
+ read_until_delim_string_op_v1(AsyncReadStream& stream,
1085
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
1086
+ const std::string& delim, ReadHandler& handler)
1087
+ : stream_(stream),
1088
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
1089
+ delim_(delim),
1090
+ start_(0),
1091
+ search_position_(0),
1092
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
1093
+ {
1094
+ }
1095
+
1096
+ #if defined(BOOST_ASIO_HAS_MOVE)
1097
+ read_until_delim_string_op_v1(const read_until_delim_string_op_v1& other)
1098
+ : stream_(other.stream_),
1099
+ buffers_(other.buffers_),
1100
+ delim_(other.delim_),
1101
+ start_(other.start_),
1102
+ search_position_(other.search_position_),
1103
+ handler_(other.handler_)
1104
+ {
1105
+ }
1106
+
1107
+ read_until_delim_string_op_v1(read_until_delim_string_op_v1&& other)
1108
+ : stream_(other.stream_),
1109
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
1110
+ delim_(BOOST_ASIO_MOVE_CAST(std::string)(other.delim_)),
1111
+ start_(other.start_),
1112
+ search_position_(other.search_position_),
1113
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
1114
+ {
1115
+ }
1116
+ #endif // defined(BOOST_ASIO_HAS_MOVE)
1117
+
1118
+ void operator()(const boost::system::error_code& ec,
1119
+ std::size_t bytes_transferred, int start = 0)
1120
+ {
1121
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
1122
+ std::size_t bytes_to_read;
1123
+ switch (start_ = start)
1124
+ {
1125
+ case 1:
1126
+ for (;;)
1127
+ {
1128
+ {
1129
+ // Determine the range of the data to be searched.
1130
+ typedef typename DynamicBuffer_v1::const_buffers_type
1131
+ buffers_type;
1132
+ typedef buffers_iterator<buffers_type> iterator;
1133
+ buffers_type data_buffers = buffers_.data();
1134
+ iterator begin = iterator::begin(data_buffers);
1135
+ iterator start_pos = begin + search_position_;
1136
+ iterator end = iterator::end(data_buffers);
1137
+
1138
+ // Look for a match.
1139
+ std::pair<iterator, bool> result = detail::partial_search(
1140
+ start_pos, end, delim_.begin(), delim_.end());
1141
+ if (result.first != end && result.second)
1142
+ {
1143
+ // Full match. We're done.
1144
+ search_position_ = result.first - begin + delim_.length();
1145
+ bytes_to_read = 0;
1146
+ }
1147
+
1148
+ // No match yet. Check if buffer is full.
1149
+ else if (buffers_.size() == buffers_.max_size())
1150
+ {
1151
+ search_position_ = not_found;
1152
+ bytes_to_read = 0;
1153
+ }
1154
+
1155
+ // Need to read some more data.
1156
+ else
1157
+ {
1158
+ if (result.first != end)
1159
+ {
1160
+ // Partial match. Next search needs to start from beginning of
1161
+ // match.
1162
+ search_position_ = result.first - begin;
1163
+ }
1164
+ else
1165
+ {
1166
+ // Next search can start with the new data.
1167
+ search_position_ = end - begin;
1168
+ }
1169
+
1170
+ bytes_to_read = std::min<std::size_t>(
1171
+ std::max<std::size_t>(512,
1172
+ buffers_.capacity() - buffers_.size()),
1173
+ std::min<std::size_t>(65536,
1174
+ buffers_.max_size() - buffers_.size()));
1175
+ }
1176
+ }
1177
+
1178
+ // Check if we're done.
1179
+ if (!start && bytes_to_read == 0)
1180
+ break;
1181
+
1182
+ // Start a new asynchronous read operation to obtain more data.
1183
+ {
1184
+ BOOST_ASIO_HANDLER_LOCATION((
1185
+ __FILE__, __LINE__, "async_read_until"));
1186
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
1187
+ BOOST_ASIO_MOVE_CAST(read_until_delim_string_op_v1)(*this));
1188
+ }
1189
+ return; default:
1190
+ buffers_.commit(bytes_transferred);
1191
+ if (ec || bytes_transferred == 0)
1192
+ break;
1193
+ }
1194
+
1195
+ const boost::system::error_code result_ec =
1196
+ (search_position_ == not_found)
1197
+ ? error::not_found : ec;
1198
+
1199
+ const std::size_t result_n =
1200
+ (ec || search_position_ == not_found)
1201
+ ? 0 : search_position_;
1202
+
1203
+ handler_(result_ec, result_n);
1204
+ }
1205
+ }
1206
+
1207
+ //private:
1208
+ AsyncReadStream& stream_;
1209
+ DynamicBuffer_v1 buffers_;
1210
+ std::string delim_;
1211
+ int start_;
1212
+ std::size_t search_position_;
1213
+ ReadHandler handler_;
1214
+ };
1215
+
1216
+ template <typename AsyncReadStream,
1217
+ typename DynamicBuffer_v1, typename ReadHandler>
1218
+ inline asio_handler_allocate_is_deprecated
1219
+ asio_handler_allocate(std::size_t size,
1220
+ read_until_delim_string_op_v1<AsyncReadStream,
1221
+ DynamicBuffer_v1, ReadHandler>* this_handler)
1222
+ {
1223
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1224
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
1225
+ return asio_handler_allocate_is_no_longer_used();
1226
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
1227
+ return boost_asio_handler_alloc_helpers::allocate(
1228
+ size, this_handler->handler_);
1229
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1230
+ }
1231
+
1232
+ template <typename AsyncReadStream,
1233
+ typename DynamicBuffer_v1, typename ReadHandler>
1234
+ inline asio_handler_deallocate_is_deprecated
1235
+ asio_handler_deallocate(void* pointer, std::size_t size,
1236
+ read_until_delim_string_op_v1<AsyncReadStream,
1237
+ DynamicBuffer_v1, ReadHandler>* this_handler)
1238
+ {
1239
+ boost_asio_handler_alloc_helpers::deallocate(
1240
+ pointer, size, this_handler->handler_);
1241
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1242
+ return asio_handler_deallocate_is_no_longer_used();
1243
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1244
+ }
1245
+
1246
+ template <typename AsyncReadStream,
1247
+ typename DynamicBuffer_v1, typename ReadHandler>
1248
+ inline bool asio_handler_is_continuation(
1249
+ read_until_delim_string_op_v1<AsyncReadStream,
1250
+ DynamicBuffer_v1, ReadHandler>* this_handler)
1251
+ {
1252
+ return this_handler->start_ == 0 ? true
1253
+ : boost_asio_handler_cont_helpers::is_continuation(
1254
+ this_handler->handler_);
1255
+ }
1256
+
1257
+ template <typename Function, typename AsyncReadStream,
1258
+ typename DynamicBuffer_v1, typename ReadHandler>
1259
+ inline asio_handler_invoke_is_deprecated
1260
+ asio_handler_invoke(Function& function,
1261
+ read_until_delim_string_op_v1<AsyncReadStream,
1262
+ DynamicBuffer_v1, ReadHandler>* this_handler)
1263
+ {
1264
+ boost_asio_handler_invoke_helpers::invoke(
1265
+ function, this_handler->handler_);
1266
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1267
+ return asio_handler_invoke_is_no_longer_used();
1268
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1269
+ }
1270
+
1271
+ template <typename Function, typename AsyncReadStream,
1272
+ typename DynamicBuffer_v1, typename ReadHandler>
1273
+ inline asio_handler_invoke_is_deprecated
1274
+ asio_handler_invoke(const Function& function,
1275
+ read_until_delim_string_op_v1<AsyncReadStream,
1276
+ DynamicBuffer_v1, ReadHandler>* this_handler)
1277
+ {
1278
+ boost_asio_handler_invoke_helpers::invoke(
1279
+ function, this_handler->handler_);
1280
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1281
+ return asio_handler_invoke_is_no_longer_used();
1282
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1283
+ }
1284
+
1285
+ template <typename AsyncReadStream>
1286
+ class initiate_async_read_until_delim_string_v1
1287
+ {
1288
+ public:
1289
+ typedef typename AsyncReadStream::executor_type executor_type;
1290
+
1291
+ explicit initiate_async_read_until_delim_string_v1(AsyncReadStream& stream)
1292
+ : stream_(stream)
1293
+ {
1294
+ }
1295
+
1296
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
1297
+ {
1298
+ return stream_.get_executor();
1299
+ }
1300
+
1301
+ template <typename ReadHandler, typename DynamicBuffer_v1>
1302
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1303
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1304
+ const std::string& delim) const
1305
+ {
1306
+ // If you get an error on the following line it means that your handler
1307
+ // does not meet the documented type requirements for a ReadHandler.
1308
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1309
+
1310
+ non_const_lvalue<ReadHandler> handler2(handler);
1311
+ read_until_delim_string_op_v1<AsyncReadStream,
1312
+ typename decay<DynamicBuffer_v1>::type,
1313
+ typename decay<ReadHandler>::type>(
1314
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
1315
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
1316
+ }
1317
+
1318
+ private:
1319
+ AsyncReadStream& stream_;
1320
+ };
1321
+ } // namespace detail
1322
+
1323
+ #if !defined(GENERATING_DOCUMENTATION)
1324
+
1325
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1326
+ typename ReadHandler, typename Allocator>
1327
+ struct associated_allocator<
1328
+ detail::read_until_delim_string_op_v1<AsyncReadStream,
1329
+ DynamicBuffer_v1, ReadHandler>,
1330
+ Allocator>
1331
+ {
1332
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1333
+
1334
+ static type get(
1335
+ const detail::read_until_delim_string_op_v1<AsyncReadStream,
1336
+ DynamicBuffer_v1, ReadHandler>& h,
1337
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1338
+ {
1339
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1340
+ }
1341
+ };
1342
+
1343
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1344
+ typename ReadHandler, typename Executor>
1345
+ struct associated_executor<
1346
+ detail::read_until_delim_string_op_v1<AsyncReadStream,
1347
+ DynamicBuffer_v1, ReadHandler>,
1348
+ Executor>
1349
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1350
+ {
1351
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
1352
+
1353
+ static type get(
1354
+ const detail::read_until_delim_string_op_v1<AsyncReadStream,
1355
+ DynamicBuffer_v1, ReadHandler>& h,
1356
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1357
+ {
1358
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
1359
+ }
1360
+ };
1361
+
1362
+ #endif // !defined(GENERATING_DOCUMENTATION)
1363
+
1364
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1365
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
1366
+ std::size_t)) ReadHandler>
1367
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1368
+ void (boost::system::error_code, std::size_t))
1369
+ async_read_until(AsyncReadStream& s,
1370
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1371
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
1372
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1373
+ typename enable_if<
1374
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
1375
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
1376
+ >::type*)
1377
+ {
1378
+ return async_initiate<ReadHandler,
1379
+ void (boost::system::error_code, std::size_t)>(
1380
+ detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
1381
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
1382
+ static_cast<std::string>(delim));
1383
+ }
1384
+
1385
+ #if !defined(BOOST_ASIO_NO_EXTENSIONS)
1386
+ #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
1387
+
1388
+ namespace detail
1389
+ {
1390
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1391
+ typename RegEx, typename ReadHandler>
1392
+ class read_until_expr_op_v1
1393
+ {
1394
+ public:
1395
+ template <typename BufferSequence>
1396
+ read_until_expr_op_v1(AsyncReadStream& stream,
1397
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
1398
+ const boost::regex& expr, ReadHandler& handler)
1399
+ : stream_(stream),
1400
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
1401
+ expr_(expr),
1402
+ start_(0),
1403
+ search_position_(0),
1404
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
1405
+ {
1406
+ }
1407
+
1408
+ #if defined(BOOST_ASIO_HAS_MOVE)
1409
+ read_until_expr_op_v1(const read_until_expr_op_v1& other)
1410
+ : stream_(other.stream_),
1411
+ buffers_(other.buffers_),
1412
+ expr_(other.expr_),
1413
+ start_(other.start_),
1414
+ search_position_(other.search_position_),
1415
+ handler_(other.handler_)
1416
+ {
1417
+ }
1418
+
1419
+ read_until_expr_op_v1(read_until_expr_op_v1&& other)
1420
+ : stream_(other.stream_),
1421
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
1422
+ expr_(other.expr_),
1423
+ start_(other.start_),
1424
+ search_position_(other.search_position_),
1425
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
1426
+ {
1427
+ }
1428
+ #endif // defined(BOOST_ASIO_HAS_MOVE)
1429
+
1430
+ void operator()(const boost::system::error_code& ec,
1431
+ std::size_t bytes_transferred, int start = 0)
1432
+ {
1433
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
1434
+ std::size_t bytes_to_read;
1435
+ switch (start_ = start)
1436
+ {
1437
+ case 1:
1438
+ for (;;)
1439
+ {
1440
+ {
1441
+ // Determine the range of the data to be searched.
1442
+ typedef typename DynamicBuffer_v1::const_buffers_type
1443
+ buffers_type;
1444
+ typedef buffers_iterator<buffers_type> iterator;
1445
+ buffers_type data_buffers = buffers_.data();
1446
+ iterator begin = iterator::begin(data_buffers);
1447
+ iterator start_pos = begin + search_position_;
1448
+ iterator end = iterator::end(data_buffers);
1449
+
1450
+ // Look for a match.
1451
+ boost::match_results<iterator,
1452
+ typename std::vector<boost::sub_match<iterator> >::allocator_type>
1453
+ match_results;
1454
+ bool match = regex_search(start_pos, end, match_results, expr_,
1455
+ boost::match_default | boost::match_partial);
1456
+ if (match && match_results[0].matched)
1457
+ {
1458
+ // Full match. We're done.
1459
+ search_position_ = match_results[0].second - begin;
1460
+ bytes_to_read = 0;
1461
+ }
1462
+
1463
+ // No match yet. Check if buffer is full.
1464
+ else if (buffers_.size() == buffers_.max_size())
1465
+ {
1466
+ search_position_ = not_found;
1467
+ bytes_to_read = 0;
1468
+ }
1469
+
1470
+ // Need to read some more data.
1471
+ else
1472
+ {
1473
+ if (match)
1474
+ {
1475
+ // Partial match. Next search needs to start from beginning of
1476
+ // match.
1477
+ search_position_ = match_results[0].first - begin;
1478
+ }
1479
+ else
1480
+ {
1481
+ // Next search can start with the new data.
1482
+ search_position_ = end - begin;
1483
+ }
1484
+
1485
+ bytes_to_read = std::min<std::size_t>(
1486
+ std::max<std::size_t>(512,
1487
+ buffers_.capacity() - buffers_.size()),
1488
+ std::min<std::size_t>(65536,
1489
+ buffers_.max_size() - buffers_.size()));
1490
+ }
1491
+ }
1492
+
1493
+ // Check if we're done.
1494
+ if (!start && bytes_to_read == 0)
1495
+ break;
1496
+
1497
+ // Start a new asynchronous read operation to obtain more data.
1498
+ {
1499
+ BOOST_ASIO_HANDLER_LOCATION((
1500
+ __FILE__, __LINE__, "async_read_until"));
1501
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
1502
+ BOOST_ASIO_MOVE_CAST(read_until_expr_op_v1)(*this));
1503
+ }
1504
+ return; default:
1505
+ buffers_.commit(bytes_transferred);
1506
+ if (ec || bytes_transferred == 0)
1507
+ break;
1508
+ }
1509
+
1510
+ const boost::system::error_code result_ec =
1511
+ (search_position_ == not_found)
1512
+ ? error::not_found : ec;
1513
+
1514
+ const std::size_t result_n =
1515
+ (ec || search_position_ == not_found)
1516
+ ? 0 : search_position_;
1517
+
1518
+ handler_(result_ec, result_n);
1519
+ }
1520
+ }
1521
+
1522
+ //private:
1523
+ AsyncReadStream& stream_;
1524
+ DynamicBuffer_v1 buffers_;
1525
+ RegEx expr_;
1526
+ int start_;
1527
+ std::size_t search_position_;
1528
+ ReadHandler handler_;
1529
+ };
1530
+
1531
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1532
+ typename RegEx, typename ReadHandler>
1533
+ inline asio_handler_allocate_is_deprecated
1534
+ asio_handler_allocate(std::size_t size,
1535
+ read_until_expr_op_v1<AsyncReadStream,
1536
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
1537
+ {
1538
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1539
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
1540
+ return asio_handler_allocate_is_no_longer_used();
1541
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
1542
+ return boost_asio_handler_alloc_helpers::allocate(
1543
+ size, this_handler->handler_);
1544
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1545
+ }
1546
+
1547
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1548
+ typename RegEx, typename ReadHandler>
1549
+ inline asio_handler_deallocate_is_deprecated
1550
+ asio_handler_deallocate(void* pointer, std::size_t size,
1551
+ read_until_expr_op_v1<AsyncReadStream,
1552
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
1553
+ {
1554
+ boost_asio_handler_alloc_helpers::deallocate(
1555
+ pointer, size, this_handler->handler_);
1556
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1557
+ return asio_handler_deallocate_is_no_longer_used();
1558
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1559
+ }
1560
+
1561
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1562
+ typename RegEx, typename ReadHandler>
1563
+ inline bool asio_handler_is_continuation(
1564
+ read_until_expr_op_v1<AsyncReadStream,
1565
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
1566
+ {
1567
+ return this_handler->start_ == 0 ? true
1568
+ : boost_asio_handler_cont_helpers::is_continuation(
1569
+ this_handler->handler_);
1570
+ }
1571
+
1572
+ template <typename Function, typename AsyncReadStream,
1573
+ typename DynamicBuffer_v1, typename RegEx, typename ReadHandler>
1574
+ inline asio_handler_invoke_is_deprecated
1575
+ asio_handler_invoke(Function& function,
1576
+ read_until_expr_op_v1<AsyncReadStream,
1577
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
1578
+ {
1579
+ boost_asio_handler_invoke_helpers::invoke(
1580
+ function, this_handler->handler_);
1581
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1582
+ return asio_handler_invoke_is_no_longer_used();
1583
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1584
+ }
1585
+
1586
+ template <typename Function, typename AsyncReadStream,
1587
+ typename DynamicBuffer_v1, typename RegEx, typename ReadHandler>
1588
+ inline asio_handler_invoke_is_deprecated
1589
+ asio_handler_invoke(const Function& function,
1590
+ read_until_expr_op_v1<AsyncReadStream,
1591
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
1592
+ {
1593
+ boost_asio_handler_invoke_helpers::invoke(
1594
+ function, this_handler->handler_);
1595
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1596
+ return asio_handler_invoke_is_no_longer_used();
1597
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1598
+ }
1599
+
1600
+ template <typename AsyncReadStream>
1601
+ class initiate_async_read_until_expr_v1
1602
+ {
1603
+ public:
1604
+ typedef typename AsyncReadStream::executor_type executor_type;
1605
+
1606
+ explicit initiate_async_read_until_expr_v1(AsyncReadStream& stream)
1607
+ : stream_(stream)
1608
+ {
1609
+ }
1610
+
1611
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
1612
+ {
1613
+ return stream_.get_executor();
1614
+ }
1615
+
1616
+ template <typename ReadHandler, typename DynamicBuffer_v1, typename RegEx>
1617
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1618
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const RegEx& expr) const
1619
+ {
1620
+ // If you get an error on the following line it means that your handler
1621
+ // does not meet the documented type requirements for a ReadHandler.
1622
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1623
+
1624
+ non_const_lvalue<ReadHandler> handler2(handler);
1625
+ read_until_expr_op_v1<AsyncReadStream,
1626
+ typename decay<DynamicBuffer_v1>::type,
1627
+ RegEx, typename decay<ReadHandler>::type>(
1628
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
1629
+ expr, handler2.value)(boost::system::error_code(), 0, 1);
1630
+ }
1631
+
1632
+ private:
1633
+ AsyncReadStream& stream_;
1634
+ };
1635
+ } // namespace detail
1636
+
1637
+ #if !defined(GENERATING_DOCUMENTATION)
1638
+
1639
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1640
+ typename RegEx, typename ReadHandler, typename Allocator>
1641
+ struct associated_allocator<
1642
+ detail::read_until_expr_op_v1<AsyncReadStream,
1643
+ DynamicBuffer_v1, RegEx, ReadHandler>,
1644
+ Allocator>
1645
+ {
1646
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1647
+
1648
+ static type get(
1649
+ const detail::read_until_expr_op_v1<AsyncReadStream,
1650
+ DynamicBuffer_v1, RegEx, ReadHandler>& h,
1651
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1652
+ {
1653
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1654
+ }
1655
+ };
1656
+
1657
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1658
+ typename RegEx, typename ReadHandler, typename Executor>
1659
+ struct associated_executor<
1660
+ detail::read_until_expr_op_v1<AsyncReadStream,
1661
+ DynamicBuffer_v1, RegEx, ReadHandler>,
1662
+ Executor>
1663
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1664
+ {
1665
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
1666
+
1667
+ static type get(
1668
+ const detail::read_until_expr_op_v1<AsyncReadStream,
1669
+ DynamicBuffer_v1, RegEx, ReadHandler>& h,
1670
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1671
+ {
1672
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
1673
+ }
1674
+ };
1675
+
1676
+ #endif // !defined(GENERATING_DOCUMENTATION)
1677
+
1678
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1679
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
1680
+ std::size_t)) ReadHandler>
1681
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1682
+ void (boost::system::error_code, std::size_t))
1683
+ async_read_until(AsyncReadStream& s,
1684
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1685
+ const boost::regex& expr,
1686
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1687
+ typename enable_if<
1688
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
1689
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
1690
+ >::type*)
1691
+ {
1692
+ return async_initiate<ReadHandler,
1693
+ void (boost::system::error_code, std::size_t)>(
1694
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
1695
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr);
1696
+ }
1697
+
1698
+ #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
1699
+
1700
+ namespace detail
1701
+ {
1702
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1703
+ typename MatchCondition, typename ReadHandler>
1704
+ class read_until_match_op_v1
1705
+ {
1706
+ public:
1707
+ template <typename BufferSequence>
1708
+ read_until_match_op_v1(AsyncReadStream& stream,
1709
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
1710
+ MatchCondition match_condition, ReadHandler& handler)
1711
+ : stream_(stream),
1712
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
1713
+ match_condition_(match_condition),
1714
+ start_(0),
1715
+ search_position_(0),
1716
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
1717
+ {
1718
+ }
1719
+
1720
+ #if defined(BOOST_ASIO_HAS_MOVE)
1721
+ read_until_match_op_v1(const read_until_match_op_v1& other)
1722
+ : stream_(other.stream_),
1723
+ buffers_(other.buffers_),
1724
+ match_condition_(other.match_condition_),
1725
+ start_(other.start_),
1726
+ search_position_(other.search_position_),
1727
+ handler_(other.handler_)
1728
+ {
1729
+ }
1730
+
1731
+ read_until_match_op_v1(read_until_match_op_v1&& other)
1732
+ : stream_(other.stream_),
1733
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
1734
+ match_condition_(other.match_condition_),
1735
+ start_(other.start_),
1736
+ search_position_(other.search_position_),
1737
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
1738
+ {
1739
+ }
1740
+ #endif // defined(BOOST_ASIO_HAS_MOVE)
1741
+
1742
+ void operator()(const boost::system::error_code& ec,
1743
+ std::size_t bytes_transferred, int start = 0)
1744
+ {
1745
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
1746
+ std::size_t bytes_to_read;
1747
+ switch (start_ = start)
1748
+ {
1749
+ case 1:
1750
+ for (;;)
1751
+ {
1752
+ {
1753
+ // Determine the range of the data to be searched.
1754
+ typedef typename DynamicBuffer_v1::const_buffers_type
1755
+ buffers_type;
1756
+ typedef buffers_iterator<buffers_type> iterator;
1757
+ buffers_type data_buffers = buffers_.data();
1758
+ iterator begin = iterator::begin(data_buffers);
1759
+ iterator start_pos = begin + search_position_;
1760
+ iterator end = iterator::end(data_buffers);
1761
+
1762
+ // Look for a match.
1763
+ std::pair<iterator, bool> result = match_condition_(start_pos, end);
1764
+ if (result.second)
1765
+ {
1766
+ // Full match. We're done.
1767
+ search_position_ = result.first - begin;
1768
+ bytes_to_read = 0;
1769
+ }
1770
+
1771
+ // No match yet. Check if buffer is full.
1772
+ else if (buffers_.size() == buffers_.max_size())
1773
+ {
1774
+ search_position_ = not_found;
1775
+ bytes_to_read = 0;
1776
+ }
1777
+
1778
+ // Need to read some more data.
1779
+ else
1780
+ {
1781
+ if (result.first != end)
1782
+ {
1783
+ // Partial match. Next search needs to start from beginning of
1784
+ // match.
1785
+ search_position_ = result.first - begin;
1786
+ }
1787
+ else
1788
+ {
1789
+ // Next search can start with the new data.
1790
+ search_position_ = end - begin;
1791
+ }
1792
+
1793
+ bytes_to_read = std::min<std::size_t>(
1794
+ std::max<std::size_t>(512,
1795
+ buffers_.capacity() - buffers_.size()),
1796
+ std::min<std::size_t>(65536,
1797
+ buffers_.max_size() - buffers_.size()));
1798
+ }
1799
+ }
1800
+
1801
+ // Check if we're done.
1802
+ if (!start && bytes_to_read == 0)
1803
+ break;
1804
+
1805
+ // Start a new asynchronous read operation to obtain more data.
1806
+ {
1807
+ BOOST_ASIO_HANDLER_LOCATION((
1808
+ __FILE__, __LINE__, "async_read_until"));
1809
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
1810
+ BOOST_ASIO_MOVE_CAST(read_until_match_op_v1)(*this));
1811
+ }
1812
+ return; default:
1813
+ buffers_.commit(bytes_transferred);
1814
+ if (ec || bytes_transferred == 0)
1815
+ break;
1816
+ }
1817
+
1818
+ const boost::system::error_code result_ec =
1819
+ (search_position_ == not_found)
1820
+ ? error::not_found : ec;
1821
+
1822
+ const std::size_t result_n =
1823
+ (ec || search_position_ == not_found)
1824
+ ? 0 : search_position_;
1825
+
1826
+ handler_(result_ec, result_n);
1827
+ }
1828
+ }
1829
+
1830
+ //private:
1831
+ AsyncReadStream& stream_;
1832
+ DynamicBuffer_v1 buffers_;
1833
+ MatchCondition match_condition_;
1834
+ int start_;
1835
+ std::size_t search_position_;
1836
+ ReadHandler handler_;
1837
+ };
1838
+
1839
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1840
+ typename MatchCondition, typename ReadHandler>
1841
+ inline asio_handler_allocate_is_deprecated
1842
+ asio_handler_allocate(std::size_t size,
1843
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
1844
+ MatchCondition, ReadHandler>* this_handler)
1845
+ {
1846
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1847
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
1848
+ return asio_handler_allocate_is_no_longer_used();
1849
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
1850
+ return boost_asio_handler_alloc_helpers::allocate(
1851
+ size, this_handler->handler_);
1852
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1853
+ }
1854
+
1855
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1856
+ typename MatchCondition, typename ReadHandler>
1857
+ inline asio_handler_deallocate_is_deprecated
1858
+ asio_handler_deallocate(void* pointer, std::size_t size,
1859
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
1860
+ MatchCondition, ReadHandler>* this_handler)
1861
+ {
1862
+ boost_asio_handler_alloc_helpers::deallocate(
1863
+ pointer, size, this_handler->handler_);
1864
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1865
+ return asio_handler_deallocate_is_no_longer_used();
1866
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1867
+ }
1868
+
1869
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1870
+ typename MatchCondition, typename ReadHandler>
1871
+ inline bool asio_handler_is_continuation(
1872
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
1873
+ MatchCondition, ReadHandler>* this_handler)
1874
+ {
1875
+ return this_handler->start_ == 0 ? true
1876
+ : boost_asio_handler_cont_helpers::is_continuation(
1877
+ this_handler->handler_);
1878
+ }
1879
+
1880
+ template <typename Function, typename AsyncReadStream,
1881
+ typename DynamicBuffer_v1, typename MatchCondition,
1882
+ typename ReadHandler>
1883
+ inline asio_handler_invoke_is_deprecated
1884
+ asio_handler_invoke(Function& function,
1885
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
1886
+ MatchCondition, ReadHandler>* this_handler)
1887
+ {
1888
+ boost_asio_handler_invoke_helpers::invoke(
1889
+ function, this_handler->handler_);
1890
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1891
+ return asio_handler_invoke_is_no_longer_used();
1892
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1893
+ }
1894
+
1895
+ template <typename Function, typename AsyncReadStream,
1896
+ typename DynamicBuffer_v1, typename MatchCondition,
1897
+ typename ReadHandler>
1898
+ inline asio_handler_invoke_is_deprecated
1899
+ asio_handler_invoke(const Function& function,
1900
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
1901
+ MatchCondition, ReadHandler>* this_handler)
1902
+ {
1903
+ boost_asio_handler_invoke_helpers::invoke(
1904
+ function, this_handler->handler_);
1905
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
1906
+ return asio_handler_invoke_is_no_longer_used();
1907
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1908
+ }
1909
+
1910
+ template <typename AsyncReadStream>
1911
+ class initiate_async_read_until_match_v1
1912
+ {
1913
+ public:
1914
+ typedef typename AsyncReadStream::executor_type executor_type;
1915
+
1916
+ explicit initiate_async_read_until_match_v1(AsyncReadStream& stream)
1917
+ : stream_(stream)
1918
+ {
1919
+ }
1920
+
1921
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
1922
+ {
1923
+ return stream_.get_executor();
1924
+ }
1925
+
1926
+ template <typename ReadHandler,
1927
+ typename DynamicBuffer_v1, typename MatchCondition>
1928
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1929
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1930
+ MatchCondition match_condition) const
1931
+ {
1932
+ // If you get an error on the following line it means that your handler
1933
+ // does not meet the documented type requirements for a ReadHandler.
1934
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1935
+
1936
+ non_const_lvalue<ReadHandler> handler2(handler);
1937
+ read_until_match_op_v1<AsyncReadStream,
1938
+ typename decay<DynamicBuffer_v1>::type,
1939
+ MatchCondition, typename decay<ReadHandler>::type>(
1940
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
1941
+ match_condition, handler2.value)(boost::system::error_code(), 0, 1);
1942
+ }
1943
+
1944
+ private:
1945
+ AsyncReadStream& stream_;
1946
+ };
1947
+ } // namespace detail
1948
+
1949
+ #if !defined(GENERATING_DOCUMENTATION)
1950
+
1951
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1952
+ typename MatchCondition, typename ReadHandler, typename Allocator>
1953
+ struct associated_allocator<
1954
+ detail::read_until_match_op_v1<AsyncReadStream,
1955
+ DynamicBuffer_v1, MatchCondition, ReadHandler>,
1956
+ Allocator>
1957
+ {
1958
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1959
+
1960
+ static type get(
1961
+ const detail::read_until_match_op_v1<AsyncReadStream,
1962
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h,
1963
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1964
+ {
1965
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1966
+ }
1967
+ };
1968
+
1969
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
1970
+ typename MatchCondition, typename ReadHandler, typename Executor>
1971
+ struct associated_executor<
1972
+ detail::read_until_match_op_v1<AsyncReadStream,
1973
+ DynamicBuffer_v1, MatchCondition, ReadHandler>,
1974
+ Executor>
1975
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1976
+ {
1977
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
1978
+
1979
+ static type get(
1980
+ const detail::read_until_match_op_v1<AsyncReadStream,
1981
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h,
1982
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1983
+ {
1984
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
353
1985
  }
354
- }
1986
+ };
355
1987
 
356
- #if !defined(BOOST_ASIO_NO_IOSTREAM)
1988
+ #endif // !defined(GENERATING_DOCUMENTATION)
357
1989
 
358
- template <typename SyncReadStream, typename Allocator>
359
- inline std::size_t read_until(SyncReadStream& s,
360
- boost::asio::basic_streambuf<Allocator>& b, char delim)
1990
+ template <typename AsyncReadStream,
1991
+ typename DynamicBuffer_v1, typename MatchCondition,
1992
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
1993
+ std::size_t)) ReadHandler>
1994
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1995
+ void (boost::system::error_code, std::size_t))
1996
+ async_read_until(AsyncReadStream& s,
1997
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1998
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1999
+ typename enable_if<
2000
+ is_match_condition<MatchCondition>::value
2001
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
2002
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
2003
+ >::type*)
361
2004
  {
362
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
2005
+ return async_initiate<ReadHandler,
2006
+ void (boost::system::error_code, std::size_t)>(
2007
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s), handler,
2008
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), match_condition);
363
2009
  }
364
2010
 
365
- template <typename SyncReadStream, typename Allocator>
366
- inline std::size_t read_until(SyncReadStream& s,
367
- boost::asio::basic_streambuf<Allocator>& b, char delim,
368
- boost::system::error_code& ec)
369
- {
370
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
371
- }
2011
+ #if !defined(BOOST_ASIO_NO_IOSTREAM)
372
2012
 
373
- template <typename SyncReadStream, typename Allocator>
374
- inline std::size_t read_until(SyncReadStream& s,
2013
+ template <typename AsyncReadStream, typename Allocator,
2014
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2015
+ std::size_t)) ReadHandler>
2016
+ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
2017
+ void (boost::system::error_code, std::size_t))
2018
+ async_read_until(AsyncReadStream& s,
375
2019
  boost::asio::basic_streambuf<Allocator>& b,
376
- BOOST_ASIO_STRING_VIEW_PARAM delim)
2020
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
377
2021
  {
378
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
2022
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
2023
+ delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
379
2024
  }
380
2025
 
381
- template <typename SyncReadStream, typename Allocator>
382
- inline std::size_t read_until(SyncReadStream& s,
2026
+ template <typename AsyncReadStream, typename Allocator,
2027
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2028
+ std::size_t)) ReadHandler>
2029
+ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
2030
+ void (boost::system::error_code, std::size_t))
2031
+ async_read_until(AsyncReadStream& s,
383
2032
  boost::asio::basic_streambuf<Allocator>& b,
384
- BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
2033
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
2034
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
385
2035
  {
386
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
2036
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
2037
+ delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
387
2038
  }
388
2039
 
389
2040
  #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
390
2041
 
391
- template <typename SyncReadStream, typename Allocator>
392
- inline std::size_t read_until(SyncReadStream& s,
393
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
394
- {
395
- return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
396
- }
397
-
398
- template <typename SyncReadStream, typename Allocator>
399
- inline std::size_t read_until(SyncReadStream& s,
2042
+ template <typename AsyncReadStream, typename Allocator,
2043
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2044
+ std::size_t)) ReadHandler>
2045
+ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
2046
+ void (boost::system::error_code, std::size_t))
2047
+ async_read_until(AsyncReadStream& s,
400
2048
  boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
401
- boost::system::error_code& ec)
2049
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
402
2050
  {
403
- return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
2051
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
2052
+ expr, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
404
2053
  }
405
2054
 
406
2055
  #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
407
2056
 
408
- template <typename SyncReadStream, typename Allocator, typename MatchCondition>
409
- inline std::size_t read_until(SyncReadStream& s,
410
- boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
411
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
412
- {
413
- return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
414
- }
415
-
416
- template <typename SyncReadStream, typename Allocator, typename MatchCondition>
417
- inline std::size_t read_until(SyncReadStream& s,
2057
+ template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
2058
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2059
+ std::size_t)) ReadHandler>
2060
+ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
2061
+ void (boost::system::error_code, std::size_t))
2062
+ async_read_until(AsyncReadStream& s,
418
2063
  boost::asio::basic_streambuf<Allocator>& b,
419
- MatchCondition match_condition, boost::system::error_code& ec,
2064
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
420
2065
  typename enable_if<is_match_condition<MatchCondition>::value>::type*)
421
2066
  {
422
- return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
2067
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
2068
+ match_condition, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
423
2069
  }
424
2070
 
425
2071
  #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
426
2072
  #endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
2073
+ #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
427
2074
 
428
2075
  namespace detail
429
2076
  {
430
2077
  template <typename AsyncReadStream,
431
- typename DynamicBuffer, typename ReadHandler>
432
- class read_until_delim_op
2078
+ typename DynamicBuffer_v2, typename ReadHandler>
2079
+ class read_until_delim_op_v2
433
2080
  {
434
2081
  public:
435
2082
  template <typename BufferSequence>
436
- read_until_delim_op(AsyncReadStream& stream,
2083
+ read_until_delim_op_v2(AsyncReadStream& stream,
437
2084
  BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
438
2085
  char delim, ReadHandler& handler)
439
2086
  : stream_(stream),
@@ -441,27 +2088,30 @@ namespace detail
441
2088
  delim_(delim),
442
2089
  start_(0),
443
2090
  search_position_(0),
2091
+ bytes_to_read_(0),
444
2092
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
445
2093
  {
446
2094
  }
447
2095
 
448
2096
  #if defined(BOOST_ASIO_HAS_MOVE)
449
- read_until_delim_op(const read_until_delim_op& other)
2097
+ read_until_delim_op_v2(const read_until_delim_op_v2& other)
450
2098
  : stream_(other.stream_),
451
2099
  buffers_(other.buffers_),
452
2100
  delim_(other.delim_),
453
2101
  start_(other.start_),
454
2102
  search_position_(other.search_position_),
2103
+ bytes_to_read_(other.bytes_to_read_),
455
2104
  handler_(other.handler_)
456
2105
  {
457
2106
  }
458
2107
 
459
- read_until_delim_op(read_until_delim_op&& other)
2108
+ read_until_delim_op_v2(read_until_delim_op_v2&& other)
460
2109
  : stream_(other.stream_),
461
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
2110
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
462
2111
  delim_(other.delim_),
463
2112
  start_(other.start_),
464
2113
  search_position_(other.search_position_),
2114
+ bytes_to_read_(other.bytes_to_read_),
465
2115
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
466
2116
  {
467
2117
  }
@@ -471,7 +2121,7 @@ namespace detail
471
2121
  std::size_t bytes_transferred, int start = 0)
472
2122
  {
473
2123
  const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
474
- std::size_t bytes_to_read;
2124
+ std::size_t pos;
475
2125
  switch (start_ = start)
476
2126
  {
477
2127
  case 1:
@@ -479,10 +2129,12 @@ namespace detail
479
2129
  {
480
2130
  {
481
2131
  // Determine the range of the data to be searched.
482
- typedef typename DynamicBuffer::const_buffers_type
2132
+ typedef typename DynamicBuffer_v2::const_buffers_type
483
2133
  buffers_type;
484
2134
  typedef buffers_iterator<buffers_type> iterator;
485
- buffers_type data_buffers = buffers_.data();
2135
+ buffers_type data_buffers =
2136
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
2137
+ 0, buffers_.size());
486
2138
  iterator begin = iterator::begin(data_buffers);
487
2139
  iterator start_pos = begin + search_position_;
488
2140
  iterator end = iterator::end(data_buffers);
@@ -493,14 +2145,14 @@ namespace detail
493
2145
  {
494
2146
  // Found a match. We're done.
495
2147
  search_position_ = iter - begin + 1;
496
- bytes_to_read = 0;
2148
+ bytes_to_read_ = 0;
497
2149
  }
498
2150
 
499
2151
  // No match yet. Check if buffer is full.
500
2152
  else if (buffers_.size() == buffers_.max_size())
501
2153
  {
502
2154
  search_position_ = not_found;
503
- bytes_to_read = 0;
2155
+ bytes_to_read_ = 0;
504
2156
  }
505
2157
 
506
2158
  // Need to read some more data.
@@ -508,7 +2160,7 @@ namespace detail
508
2160
  {
509
2161
  // Next search can start with the new data.
510
2162
  search_position_ = end - begin;
511
- bytes_to_read = std::min<std::size_t>(
2163
+ bytes_to_read_ = std::min<std::size_t>(
512
2164
  std::max<std::size_t>(512,
513
2165
  buffers_.capacity() - buffers_.size()),
514
2166
  std::min<std::size_t>(65536,
@@ -517,14 +2169,20 @@ namespace detail
517
2169
  }
518
2170
 
519
2171
  // Check if we're done.
520
- if (!start && bytes_to_read == 0)
2172
+ if (!start && bytes_to_read_ == 0)
521
2173
  break;
522
2174
 
523
2175
  // Start a new asynchronous read operation to obtain more data.
524
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
525
- BOOST_ASIO_MOVE_CAST(read_until_delim_op)(*this));
2176
+ pos = buffers_.size();
2177
+ buffers_.grow(bytes_to_read_);
2178
+ {
2179
+ BOOST_ASIO_HANDLER_LOCATION((
2180
+ __FILE__, __LINE__, "async_read_until"));
2181
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
2182
+ BOOST_ASIO_MOVE_CAST(read_until_delim_op_v2)(*this));
2183
+ }
526
2184
  return; default:
527
- buffers_.commit(bytes_transferred);
2185
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
528
2186
  if (ec || bytes_transferred == 0)
529
2187
  break;
530
2188
  }
@@ -543,38 +2201,49 @@ namespace detail
543
2201
 
544
2202
  //private:
545
2203
  AsyncReadStream& stream_;
546
- DynamicBuffer buffers_;
2204
+ DynamicBuffer_v2 buffers_;
547
2205
  char delim_;
548
2206
  int start_;
549
2207
  std::size_t search_position_;
2208
+ std::size_t bytes_to_read_;
550
2209
  ReadHandler handler_;
551
2210
  };
552
2211
 
553
2212
  template <typename AsyncReadStream,
554
- typename DynamicBuffer, typename ReadHandler>
555
- inline void* asio_handler_allocate(std::size_t size,
556
- read_until_delim_op<AsyncReadStream,
557
- DynamicBuffer, ReadHandler>* this_handler)
2213
+ typename DynamicBuffer_v2, typename ReadHandler>
2214
+ inline asio_handler_allocate_is_deprecated
2215
+ asio_handler_allocate(std::size_t size,
2216
+ read_until_delim_op_v2<AsyncReadStream,
2217
+ DynamicBuffer_v2, ReadHandler>* this_handler)
558
2218
  {
2219
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2220
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
2221
+ return asio_handler_allocate_is_no_longer_used();
2222
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
559
2223
  return boost_asio_handler_alloc_helpers::allocate(
560
2224
  size, this_handler->handler_);
2225
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
561
2226
  }
562
2227
 
563
2228
  template <typename AsyncReadStream,
564
- typename DynamicBuffer, typename ReadHandler>
565
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
566
- read_until_delim_op<AsyncReadStream,
567
- DynamicBuffer, ReadHandler>* this_handler)
2229
+ typename DynamicBuffer_v2, typename ReadHandler>
2230
+ inline asio_handler_deallocate_is_deprecated
2231
+ asio_handler_deallocate(void* pointer, std::size_t size,
2232
+ read_until_delim_op_v2<AsyncReadStream,
2233
+ DynamicBuffer_v2, ReadHandler>* this_handler)
568
2234
  {
569
2235
  boost_asio_handler_alloc_helpers::deallocate(
570
2236
  pointer, size, this_handler->handler_);
2237
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2238
+ return asio_handler_deallocate_is_no_longer_used();
2239
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
571
2240
  }
572
2241
 
573
2242
  template <typename AsyncReadStream,
574
- typename DynamicBuffer, typename ReadHandler>
2243
+ typename DynamicBuffer_v2, typename ReadHandler>
575
2244
  inline bool asio_handler_is_continuation(
576
- read_until_delim_op<AsyncReadStream,
577
- DynamicBuffer, ReadHandler>* this_handler)
2245
+ read_until_delim_op_v2<AsyncReadStream,
2246
+ DynamicBuffer_v2, ReadHandler>* this_handler)
578
2247
  {
579
2248
  return this_handler->start_ == 0 ? true
580
2249
  : boost_asio_handler_cont_helpers::is_continuation(
@@ -582,58 +2251,103 @@ namespace detail
582
2251
  }
583
2252
 
584
2253
  template <typename Function, typename AsyncReadStream,
585
- typename DynamicBuffer, typename ReadHandler>
586
- inline void asio_handler_invoke(Function& function,
587
- read_until_delim_op<AsyncReadStream,
588
- DynamicBuffer, ReadHandler>* this_handler)
2254
+ typename DynamicBuffer_v2, typename ReadHandler>
2255
+ inline asio_handler_invoke_is_deprecated
2256
+ asio_handler_invoke(Function& function,
2257
+ read_until_delim_op_v2<AsyncReadStream,
2258
+ DynamicBuffer_v2, ReadHandler>* this_handler)
589
2259
  {
590
2260
  boost_asio_handler_invoke_helpers::invoke(
591
2261
  function, this_handler->handler_);
2262
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2263
+ return asio_handler_invoke_is_no_longer_used();
2264
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
592
2265
  }
593
2266
 
594
2267
  template <typename Function, typename AsyncReadStream,
595
- typename DynamicBuffer, typename ReadHandler>
596
- inline void asio_handler_invoke(const Function& function,
597
- read_until_delim_op<AsyncReadStream,
598
- DynamicBuffer, ReadHandler>* this_handler)
2268
+ typename DynamicBuffer_v2, typename ReadHandler>
2269
+ inline asio_handler_invoke_is_deprecated
2270
+ asio_handler_invoke(const Function& function,
2271
+ read_until_delim_op_v2<AsyncReadStream,
2272
+ DynamicBuffer_v2, ReadHandler>* this_handler)
599
2273
  {
600
2274
  boost_asio_handler_invoke_helpers::invoke(
601
2275
  function, this_handler->handler_);
2276
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2277
+ return asio_handler_invoke_is_no_longer_used();
2278
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
602
2279
  }
2280
+
2281
+ template <typename AsyncReadStream>
2282
+ class initiate_async_read_until_delim_v2
2283
+ {
2284
+ public:
2285
+ typedef typename AsyncReadStream::executor_type executor_type;
2286
+
2287
+ explicit initiate_async_read_until_delim_v2(AsyncReadStream& stream)
2288
+ : stream_(stream)
2289
+ {
2290
+ }
2291
+
2292
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
2293
+ {
2294
+ return stream_.get_executor();
2295
+ }
2296
+
2297
+ template <typename ReadHandler, typename DynamicBuffer_v2>
2298
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
2299
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers, char delim) const
2300
+ {
2301
+ // If you get an error on the following line it means that your handler
2302
+ // does not meet the documented type requirements for a ReadHandler.
2303
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
2304
+
2305
+ non_const_lvalue<ReadHandler> handler2(handler);
2306
+ read_until_delim_op_v2<AsyncReadStream,
2307
+ typename decay<DynamicBuffer_v2>::type,
2308
+ typename decay<ReadHandler>::type>(
2309
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
2310
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
2311
+ }
2312
+
2313
+ private:
2314
+ AsyncReadStream& stream_;
2315
+ };
603
2316
  } // namespace detail
604
2317
 
605
2318
  #if !defined(GENERATING_DOCUMENTATION)
606
2319
 
607
- template <typename AsyncReadStream, typename DynamicBuffer,
2320
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
608
2321
  typename ReadHandler, typename Allocator>
609
2322
  struct associated_allocator<
610
- detail::read_until_delim_op<AsyncReadStream,
611
- DynamicBuffer, ReadHandler>,
2323
+ detail::read_until_delim_op_v2<AsyncReadStream,
2324
+ DynamicBuffer_v2, ReadHandler>,
612
2325
  Allocator>
613
2326
  {
614
2327
  typedef typename associated_allocator<ReadHandler, Allocator>::type type;
615
2328
 
616
2329
  static type get(
617
- const detail::read_until_delim_op<AsyncReadStream,
618
- DynamicBuffer, ReadHandler>& h,
2330
+ const detail::read_until_delim_op_v2<AsyncReadStream,
2331
+ DynamicBuffer_v2, ReadHandler>& h,
619
2332
  const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
620
2333
  {
621
2334
  return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
622
2335
  }
623
2336
  };
624
2337
 
625
- template <typename AsyncReadStream, typename DynamicBuffer,
2338
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
626
2339
  typename ReadHandler, typename Executor>
627
2340
  struct associated_executor<
628
- detail::read_until_delim_op<AsyncReadStream,
629
- DynamicBuffer, ReadHandler>,
2341
+ detail::read_until_delim_op_v2<AsyncReadStream,
2342
+ DynamicBuffer_v2, ReadHandler>,
630
2343
  Executor>
2344
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
631
2345
  {
632
2346
  typedef typename associated_executor<ReadHandler, Executor>::type type;
633
2347
 
634
2348
  static type get(
635
- const detail::read_until_delim_op<AsyncReadStream,
636
- DynamicBuffer, ReadHandler>& h,
2349
+ const detail::read_until_delim_op_v2<AsyncReadStream,
2350
+ DynamicBuffer_v2, ReadHandler>& h,
637
2351
  const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
638
2352
  {
639
2353
  return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -642,40 +2356,32 @@ struct associated_executor<
642
2356
 
643
2357
  #endif // !defined(GENERATING_DOCUMENTATION)
644
2358
 
645
- template <typename AsyncReadStream,
646
- typename DynamicBuffer, typename ReadHandler>
647
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
2359
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
2360
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2361
+ std::size_t)) ReadHandler>
2362
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
648
2363
  void (boost::system::error_code, std::size_t))
649
- async_read_until(AsyncReadStream& s,
650
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
651
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
2364
+ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
2365
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
2366
+ typename enable_if<
2367
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
2368
+ >::type*)
652
2369
  {
653
- // If you get an error on the following line it means that your handler does
654
- // not meet the documented type requirements for a ReadHandler.
655
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
656
-
657
- async_completion<ReadHandler,
658
- void (boost::system::error_code, std::size_t)> init(handler);
659
-
660
- detail::read_until_delim_op<AsyncReadStream,
661
- typename decay<DynamicBuffer>::type,
662
- BOOST_ASIO_HANDLER_TYPE(ReadHandler,
663
- void (boost::system::error_code, std::size_t))>(
664
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
665
- delim, init.completion_handler)(boost::system::error_code(), 0, 1);
666
-
667
- return init.result.get();
2370
+ return async_initiate<ReadHandler,
2371
+ void (boost::system::error_code, std::size_t)>(
2372
+ detail::initiate_async_read_until_delim_v2<AsyncReadStream>(s),
2373
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim);
668
2374
  }
669
2375
 
670
2376
  namespace detail
671
2377
  {
672
2378
  template <typename AsyncReadStream,
673
- typename DynamicBuffer, typename ReadHandler>
674
- class read_until_delim_string_op
2379
+ typename DynamicBuffer_v2, typename ReadHandler>
2380
+ class read_until_delim_string_op_v2
675
2381
  {
676
2382
  public:
677
2383
  template <typename BufferSequence>
678
- read_until_delim_string_op(AsyncReadStream& stream,
2384
+ read_until_delim_string_op_v2(AsyncReadStream& stream,
679
2385
  BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
680
2386
  const std::string& delim, ReadHandler& handler)
681
2387
  : stream_(stream),
@@ -683,27 +2389,30 @@ namespace detail
683
2389
  delim_(delim),
684
2390
  start_(0),
685
2391
  search_position_(0),
2392
+ bytes_to_read_(0),
686
2393
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
687
2394
  {
688
2395
  }
689
2396
 
690
2397
  #if defined(BOOST_ASIO_HAS_MOVE)
691
- read_until_delim_string_op(const read_until_delim_string_op& other)
2398
+ read_until_delim_string_op_v2(const read_until_delim_string_op_v2& other)
692
2399
  : stream_(other.stream_),
693
2400
  buffers_(other.buffers_),
694
2401
  delim_(other.delim_),
695
2402
  start_(other.start_),
696
2403
  search_position_(other.search_position_),
2404
+ bytes_to_read_(other.bytes_to_read_),
697
2405
  handler_(other.handler_)
698
2406
  {
699
2407
  }
700
2408
 
701
- read_until_delim_string_op(read_until_delim_string_op&& other)
2409
+ read_until_delim_string_op_v2(read_until_delim_string_op_v2&& other)
702
2410
  : stream_(other.stream_),
703
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
2411
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
704
2412
  delim_(BOOST_ASIO_MOVE_CAST(std::string)(other.delim_)),
705
2413
  start_(other.start_),
706
2414
  search_position_(other.search_position_),
2415
+ bytes_to_read_(other.bytes_to_read_),
707
2416
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
708
2417
  {
709
2418
  }
@@ -713,7 +2422,7 @@ namespace detail
713
2422
  std::size_t bytes_transferred, int start = 0)
714
2423
  {
715
2424
  const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
716
- std::size_t bytes_to_read;
2425
+ std::size_t pos;
717
2426
  switch (start_ = start)
718
2427
  {
719
2428
  case 1:
@@ -721,10 +2430,12 @@ namespace detail
721
2430
  {
722
2431
  {
723
2432
  // Determine the range of the data to be searched.
724
- typedef typename DynamicBuffer::const_buffers_type
2433
+ typedef typename DynamicBuffer_v2::const_buffers_type
725
2434
  buffers_type;
726
2435
  typedef buffers_iterator<buffers_type> iterator;
727
- buffers_type data_buffers = buffers_.data();
2436
+ buffers_type data_buffers =
2437
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
2438
+ 0, buffers_.size());
728
2439
  iterator begin = iterator::begin(data_buffers);
729
2440
  iterator start_pos = begin + search_position_;
730
2441
  iterator end = iterator::end(data_buffers);
@@ -736,14 +2447,14 @@ namespace detail
736
2447
  {
737
2448
  // Full match. We're done.
738
2449
  search_position_ = result.first - begin + delim_.length();
739
- bytes_to_read = 0;
2450
+ bytes_to_read_ = 0;
740
2451
  }
741
2452
 
742
2453
  // No match yet. Check if buffer is full.
743
2454
  else if (buffers_.size() == buffers_.max_size())
744
2455
  {
745
2456
  search_position_ = not_found;
746
- bytes_to_read = 0;
2457
+ bytes_to_read_ = 0;
747
2458
  }
748
2459
 
749
2460
  // Need to read some more data.
@@ -761,7 +2472,7 @@ namespace detail
761
2472
  search_position_ = end - begin;
762
2473
  }
763
2474
 
764
- bytes_to_read = std::min<std::size_t>(
2475
+ bytes_to_read_ = std::min<std::size_t>(
765
2476
  std::max<std::size_t>(512,
766
2477
  buffers_.capacity() - buffers_.size()),
767
2478
  std::min<std::size_t>(65536,
@@ -770,14 +2481,20 @@ namespace detail
770
2481
  }
771
2482
 
772
2483
  // Check if we're done.
773
- if (!start && bytes_to_read == 0)
2484
+ if (!start && bytes_to_read_ == 0)
774
2485
  break;
775
2486
 
776
2487
  // Start a new asynchronous read operation to obtain more data.
777
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
778
- BOOST_ASIO_MOVE_CAST(read_until_delim_string_op)(*this));
2488
+ pos = buffers_.size();
2489
+ buffers_.grow(bytes_to_read_);
2490
+ {
2491
+ BOOST_ASIO_HANDLER_LOCATION((
2492
+ __FILE__, __LINE__, "async_read_until"));
2493
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
2494
+ BOOST_ASIO_MOVE_CAST(read_until_delim_string_op_v2)(*this));
2495
+ }
779
2496
  return; default:
780
- buffers_.commit(bytes_transferred);
2497
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
781
2498
  if (ec || bytes_transferred == 0)
782
2499
  break;
783
2500
  }
@@ -796,38 +2513,49 @@ namespace detail
796
2513
 
797
2514
  //private:
798
2515
  AsyncReadStream& stream_;
799
- DynamicBuffer buffers_;
2516
+ DynamicBuffer_v2 buffers_;
800
2517
  std::string delim_;
801
2518
  int start_;
802
2519
  std::size_t search_position_;
2520
+ std::size_t bytes_to_read_;
803
2521
  ReadHandler handler_;
804
2522
  };
805
2523
 
806
2524
  template <typename AsyncReadStream,
807
- typename DynamicBuffer, typename ReadHandler>
808
- inline void* asio_handler_allocate(std::size_t size,
809
- read_until_delim_string_op<AsyncReadStream,
810
- DynamicBuffer, ReadHandler>* this_handler)
2525
+ typename DynamicBuffer_v2, typename ReadHandler>
2526
+ inline asio_handler_allocate_is_deprecated
2527
+ asio_handler_allocate(std::size_t size,
2528
+ read_until_delim_string_op_v2<AsyncReadStream,
2529
+ DynamicBuffer_v2, ReadHandler>* this_handler)
811
2530
  {
2531
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2532
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
2533
+ return asio_handler_allocate_is_no_longer_used();
2534
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
812
2535
  return boost_asio_handler_alloc_helpers::allocate(
813
2536
  size, this_handler->handler_);
2537
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
814
2538
  }
815
2539
 
816
2540
  template <typename AsyncReadStream,
817
- typename DynamicBuffer, typename ReadHandler>
818
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
819
- read_until_delim_string_op<AsyncReadStream,
820
- DynamicBuffer, ReadHandler>* this_handler)
2541
+ typename DynamicBuffer_v2, typename ReadHandler>
2542
+ inline asio_handler_deallocate_is_deprecated
2543
+ asio_handler_deallocate(void* pointer, std::size_t size,
2544
+ read_until_delim_string_op_v2<AsyncReadStream,
2545
+ DynamicBuffer_v2, ReadHandler>* this_handler)
821
2546
  {
822
2547
  boost_asio_handler_alloc_helpers::deallocate(
823
2548
  pointer, size, this_handler->handler_);
2549
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2550
+ return asio_handler_deallocate_is_no_longer_used();
2551
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
824
2552
  }
825
2553
 
826
2554
  template <typename AsyncReadStream,
827
- typename DynamicBuffer, typename ReadHandler>
2555
+ typename DynamicBuffer_v2, typename ReadHandler>
828
2556
  inline bool asio_handler_is_continuation(
829
- read_until_delim_string_op<AsyncReadStream,
830
- DynamicBuffer, ReadHandler>* this_handler)
2557
+ read_until_delim_string_op_v2<AsyncReadStream,
2558
+ DynamicBuffer_v2, ReadHandler>* this_handler)
831
2559
  {
832
2560
  return this_handler->start_ == 0 ? true
833
2561
  : boost_asio_handler_cont_helpers::is_continuation(
@@ -835,58 +2563,104 @@ namespace detail
835
2563
  }
836
2564
 
837
2565
  template <typename Function, typename AsyncReadStream,
838
- typename DynamicBuffer, typename ReadHandler>
839
- inline void asio_handler_invoke(Function& function,
840
- read_until_delim_string_op<AsyncReadStream,
841
- DynamicBuffer, ReadHandler>* this_handler)
2566
+ typename DynamicBuffer_v2, typename ReadHandler>
2567
+ inline asio_handler_invoke_is_deprecated
2568
+ asio_handler_invoke(Function& function,
2569
+ read_until_delim_string_op_v2<AsyncReadStream,
2570
+ DynamicBuffer_v2, ReadHandler>* this_handler)
842
2571
  {
843
2572
  boost_asio_handler_invoke_helpers::invoke(
844
2573
  function, this_handler->handler_);
2574
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2575
+ return asio_handler_invoke_is_no_longer_used();
2576
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
845
2577
  }
846
2578
 
847
2579
  template <typename Function, typename AsyncReadStream,
848
- typename DynamicBuffer, typename ReadHandler>
849
- inline void asio_handler_invoke(const Function& function,
850
- read_until_delim_string_op<AsyncReadStream,
851
- DynamicBuffer, ReadHandler>* this_handler)
2580
+ typename DynamicBuffer_v2, typename ReadHandler>
2581
+ inline asio_handler_invoke_is_deprecated
2582
+ asio_handler_invoke(const Function& function,
2583
+ read_until_delim_string_op_v2<AsyncReadStream,
2584
+ DynamicBuffer_v2, ReadHandler>* this_handler)
852
2585
  {
853
2586
  boost_asio_handler_invoke_helpers::invoke(
854
2587
  function, this_handler->handler_);
2588
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2589
+ return asio_handler_invoke_is_no_longer_used();
2590
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
855
2591
  }
2592
+
2593
+ template <typename AsyncReadStream>
2594
+ class initiate_async_read_until_delim_string_v2
2595
+ {
2596
+ public:
2597
+ typedef typename AsyncReadStream::executor_type executor_type;
2598
+
2599
+ explicit initiate_async_read_until_delim_string_v2(AsyncReadStream& stream)
2600
+ : stream_(stream)
2601
+ {
2602
+ }
2603
+
2604
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
2605
+ {
2606
+ return stream_.get_executor();
2607
+ }
2608
+
2609
+ template <typename ReadHandler, typename DynamicBuffer_v2>
2610
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
2611
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
2612
+ const std::string& delim) const
2613
+ {
2614
+ // If you get an error on the following line it means that your handler
2615
+ // does not meet the documented type requirements for a ReadHandler.
2616
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
2617
+
2618
+ non_const_lvalue<ReadHandler> handler2(handler);
2619
+ read_until_delim_string_op_v2<AsyncReadStream,
2620
+ typename decay<DynamicBuffer_v2>::type,
2621
+ typename decay<ReadHandler>::type>(
2622
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
2623
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
2624
+ }
2625
+
2626
+ private:
2627
+ AsyncReadStream& stream_;
2628
+ };
856
2629
  } // namespace detail
857
2630
 
858
2631
  #if !defined(GENERATING_DOCUMENTATION)
859
2632
 
860
- template <typename AsyncReadStream, typename DynamicBuffer,
2633
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
861
2634
  typename ReadHandler, typename Allocator>
862
2635
  struct associated_allocator<
863
- detail::read_until_delim_string_op<AsyncReadStream,
864
- DynamicBuffer, ReadHandler>,
2636
+ detail::read_until_delim_string_op_v2<AsyncReadStream,
2637
+ DynamicBuffer_v2, ReadHandler>,
865
2638
  Allocator>
866
2639
  {
867
2640
  typedef typename associated_allocator<ReadHandler, Allocator>::type type;
868
2641
 
869
2642
  static type get(
870
- const detail::read_until_delim_string_op<AsyncReadStream,
871
- DynamicBuffer, ReadHandler>& h,
2643
+ const detail::read_until_delim_string_op_v2<AsyncReadStream,
2644
+ DynamicBuffer_v2, ReadHandler>& h,
872
2645
  const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
873
2646
  {
874
2647
  return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
875
2648
  }
876
2649
  };
877
2650
 
878
- template <typename AsyncReadStream, typename DynamicBuffer,
2651
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
879
2652
  typename ReadHandler, typename Executor>
880
2653
  struct associated_executor<
881
- detail::read_until_delim_string_op<AsyncReadStream,
882
- DynamicBuffer, ReadHandler>,
2654
+ detail::read_until_delim_string_op_v2<AsyncReadStream,
2655
+ DynamicBuffer_v2, ReadHandler>,
883
2656
  Executor>
2657
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
884
2658
  {
885
2659
  typedef typename associated_executor<ReadHandler, Executor>::type type;
886
2660
 
887
2661
  static type get(
888
- const detail::read_until_delim_string_op<AsyncReadStream,
889
- DynamicBuffer, ReadHandler>& h,
2662
+ const detail::read_until_delim_string_op_v2<AsyncReadStream,
2663
+ DynamicBuffer_v2, ReadHandler>& h,
890
2664
  const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
891
2665
  {
892
2666
  return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -896,30 +2670,23 @@ struct associated_executor<
896
2670
  #endif // !defined(GENERATING_DOCUMENTATION)
897
2671
 
898
2672
  template <typename AsyncReadStream,
899
- typename DynamicBuffer, typename ReadHandler>
900
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
2673
+ typename DynamicBuffer_v2,
2674
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2675
+ std::size_t)) ReadHandler>
2676
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
901
2677
  void (boost::system::error_code, std::size_t))
902
2678
  async_read_until(AsyncReadStream& s,
903
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
904
- BOOST_ASIO_STRING_VIEW_PARAM delim,
905
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
2679
+ DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim,
2680
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
2681
+ typename enable_if<
2682
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
2683
+ >::type*)
906
2684
  {
907
- // If you get an error on the following line it means that your handler does
908
- // not meet the documented type requirements for a ReadHandler.
909
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
910
-
911
- async_completion<ReadHandler,
912
- void (boost::system::error_code, std::size_t)> init(handler);
913
-
914
- detail::read_until_delim_string_op<AsyncReadStream,
915
- typename decay<DynamicBuffer>::type,
916
- BOOST_ASIO_HANDLER_TYPE(ReadHandler,
917
- void (boost::system::error_code, std::size_t))>(
918
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
919
- static_cast<std::string>(delim),
920
- init.completion_handler)(boost::system::error_code(), 0, 1);
921
-
922
- return init.result.get();
2685
+ return async_initiate<ReadHandler,
2686
+ void (boost::system::error_code, std::size_t)>(
2687
+ detail::initiate_async_read_until_delim_string_v2<AsyncReadStream>(s),
2688
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
2689
+ static_cast<std::string>(delim));
923
2690
  }
924
2691
 
925
2692
  #if !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -927,13 +2694,13 @@ async_read_until(AsyncReadStream& s,
927
2694
 
928
2695
  namespace detail
929
2696
  {
930
- template <typename AsyncReadStream, typename DynamicBuffer,
2697
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
931
2698
  typename RegEx, typename ReadHandler>
932
- class read_until_expr_op
2699
+ class read_until_expr_op_v2
933
2700
  {
934
2701
  public:
935
2702
  template <typename BufferSequence>
936
- read_until_expr_op(AsyncReadStream& stream,
2703
+ read_until_expr_op_v2(AsyncReadStream& stream,
937
2704
  BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
938
2705
  const boost::regex& expr, ReadHandler& handler)
939
2706
  : stream_(stream),
@@ -941,27 +2708,30 @@ namespace detail
941
2708
  expr_(expr),
942
2709
  start_(0),
943
2710
  search_position_(0),
2711
+ bytes_to_read_(0),
944
2712
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
945
2713
  {
946
2714
  }
947
2715
 
948
2716
  #if defined(BOOST_ASIO_HAS_MOVE)
949
- read_until_expr_op(const read_until_expr_op& other)
2717
+ read_until_expr_op_v2(const read_until_expr_op_v2& other)
950
2718
  : stream_(other.stream_),
951
2719
  buffers_(other.buffers_),
952
2720
  expr_(other.expr_),
953
2721
  start_(other.start_),
954
2722
  search_position_(other.search_position_),
2723
+ bytes_to_read_(other.bytes_to_read_),
955
2724
  handler_(other.handler_)
956
2725
  {
957
2726
  }
958
2727
 
959
- read_until_expr_op(read_until_expr_op&& other)
2728
+ read_until_expr_op_v2(read_until_expr_op_v2&& other)
960
2729
  : stream_(other.stream_),
961
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
2730
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
962
2731
  expr_(other.expr_),
963
2732
  start_(other.start_),
964
2733
  search_position_(other.search_position_),
2734
+ bytes_to_read_(other.bytes_to_read_),
965
2735
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
966
2736
  {
967
2737
  }
@@ -971,7 +2741,7 @@ namespace detail
971
2741
  std::size_t bytes_transferred, int start = 0)
972
2742
  {
973
2743
  const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
974
- std::size_t bytes_to_read;
2744
+ std::size_t pos;
975
2745
  switch (start_ = start)
976
2746
  {
977
2747
  case 1:
@@ -979,10 +2749,12 @@ namespace detail
979
2749
  {
980
2750
  {
981
2751
  // Determine the range of the data to be searched.
982
- typedef typename DynamicBuffer::const_buffers_type
2752
+ typedef typename DynamicBuffer_v2::const_buffers_type
983
2753
  buffers_type;
984
2754
  typedef buffers_iterator<buffers_type> iterator;
985
- buffers_type data_buffers = buffers_.data();
2755
+ buffers_type data_buffers =
2756
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
2757
+ 0, buffers_.size());
986
2758
  iterator begin = iterator::begin(data_buffers);
987
2759
  iterator start_pos = begin + search_position_;
988
2760
  iterator end = iterator::end(data_buffers);
@@ -997,14 +2769,14 @@ namespace detail
997
2769
  {
998
2770
  // Full match. We're done.
999
2771
  search_position_ = match_results[0].second - begin;
1000
- bytes_to_read = 0;
2772
+ bytes_to_read_ = 0;
1001
2773
  }
1002
2774
 
1003
2775
  // No match yet. Check if buffer is full.
1004
2776
  else if (buffers_.size() == buffers_.max_size())
1005
2777
  {
1006
2778
  search_position_ = not_found;
1007
- bytes_to_read = 0;
2779
+ bytes_to_read_ = 0;
1008
2780
  }
1009
2781
 
1010
2782
  // Need to read some more data.
@@ -1022,7 +2794,7 @@ namespace detail
1022
2794
  search_position_ = end - begin;
1023
2795
  }
1024
2796
 
1025
- bytes_to_read = std::min<std::size_t>(
2797
+ bytes_to_read_ = std::min<std::size_t>(
1026
2798
  std::max<std::size_t>(512,
1027
2799
  buffers_.capacity() - buffers_.size()),
1028
2800
  std::min<std::size_t>(65536,
@@ -1031,14 +2803,20 @@ namespace detail
1031
2803
  }
1032
2804
 
1033
2805
  // Check if we're done.
1034
- if (!start && bytes_to_read == 0)
2806
+ if (!start && bytes_to_read_ == 0)
1035
2807
  break;
1036
2808
 
1037
2809
  // Start a new asynchronous read operation to obtain more data.
1038
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
1039
- BOOST_ASIO_MOVE_CAST(read_until_expr_op)(*this));
2810
+ pos = buffers_.size();
2811
+ buffers_.grow(bytes_to_read_);
2812
+ {
2813
+ BOOST_ASIO_HANDLER_LOCATION((
2814
+ __FILE__, __LINE__, "async_read_until"));
2815
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
2816
+ BOOST_ASIO_MOVE_CAST(read_until_expr_op_v2)(*this));
2817
+ }
1040
2818
  return; default:
1041
- buffers_.commit(bytes_transferred);
2819
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
1042
2820
  if (ec || bytes_transferred == 0)
1043
2821
  break;
1044
2822
  }
@@ -1057,38 +2835,49 @@ namespace detail
1057
2835
 
1058
2836
  //private:
1059
2837
  AsyncReadStream& stream_;
1060
- DynamicBuffer buffers_;
2838
+ DynamicBuffer_v2 buffers_;
1061
2839
  RegEx expr_;
1062
2840
  int start_;
1063
2841
  std::size_t search_position_;
2842
+ std::size_t bytes_to_read_;
1064
2843
  ReadHandler handler_;
1065
2844
  };
1066
2845
 
1067
- template <typename AsyncReadStream, typename DynamicBuffer,
2846
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1068
2847
  typename RegEx, typename ReadHandler>
1069
- inline void* asio_handler_allocate(std::size_t size,
1070
- read_until_expr_op<AsyncReadStream,
1071
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
2848
+ inline asio_handler_allocate_is_deprecated
2849
+ asio_handler_allocate(std::size_t size,
2850
+ read_until_expr_op_v2<AsyncReadStream,
2851
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
1072
2852
  {
2853
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2854
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
2855
+ return asio_handler_allocate_is_no_longer_used();
2856
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
1073
2857
  return boost_asio_handler_alloc_helpers::allocate(
1074
2858
  size, this_handler->handler_);
2859
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1075
2860
  }
1076
2861
 
1077
- template <typename AsyncReadStream, typename DynamicBuffer,
2862
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1078
2863
  typename RegEx, typename ReadHandler>
1079
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
1080
- read_until_expr_op<AsyncReadStream,
1081
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
2864
+ inline asio_handler_deallocate_is_deprecated
2865
+ asio_handler_deallocate(void* pointer, std::size_t size,
2866
+ read_until_expr_op_v2<AsyncReadStream,
2867
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
1082
2868
  {
1083
2869
  boost_asio_handler_alloc_helpers::deallocate(
1084
2870
  pointer, size, this_handler->handler_);
2871
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2872
+ return asio_handler_deallocate_is_no_longer_used();
2873
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1085
2874
  }
1086
2875
 
1087
- template <typename AsyncReadStream, typename DynamicBuffer,
2876
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1088
2877
  typename RegEx, typename ReadHandler>
1089
2878
  inline bool asio_handler_is_continuation(
1090
- read_until_expr_op<AsyncReadStream,
1091
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
2879
+ read_until_expr_op_v2<AsyncReadStream,
2880
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
1092
2881
  {
1093
2882
  return this_handler->start_ == 0 ? true
1094
2883
  : boost_asio_handler_cont_helpers::is_continuation(
@@ -1096,58 +2885,104 @@ namespace detail
1096
2885
  }
1097
2886
 
1098
2887
  template <typename Function, typename AsyncReadStream,
1099
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
1100
- inline void asio_handler_invoke(Function& function,
1101
- read_until_expr_op<AsyncReadStream,
1102
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
2888
+ typename DynamicBuffer_v2, typename RegEx, typename ReadHandler>
2889
+ inline asio_handler_invoke_is_deprecated
2890
+ asio_handler_invoke(Function& function,
2891
+ read_until_expr_op_v2<AsyncReadStream,
2892
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
1103
2893
  {
1104
2894
  boost_asio_handler_invoke_helpers::invoke(
1105
2895
  function, this_handler->handler_);
2896
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2897
+ return asio_handler_invoke_is_no_longer_used();
2898
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1106
2899
  }
1107
2900
 
1108
2901
  template <typename Function, typename AsyncReadStream,
1109
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
1110
- inline void asio_handler_invoke(const Function& function,
1111
- read_until_expr_op<AsyncReadStream,
1112
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
2902
+ typename DynamicBuffer_v2, typename RegEx, typename ReadHandler>
2903
+ inline asio_handler_invoke_is_deprecated
2904
+ asio_handler_invoke(const Function& function,
2905
+ read_until_expr_op_v2<AsyncReadStream,
2906
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
1113
2907
  {
1114
2908
  boost_asio_handler_invoke_helpers::invoke(
1115
2909
  function, this_handler->handler_);
2910
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
2911
+ return asio_handler_invoke_is_no_longer_used();
2912
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1116
2913
  }
2914
+
2915
+ template <typename AsyncReadStream>
2916
+ class initiate_async_read_until_expr_v2
2917
+ {
2918
+ public:
2919
+ typedef typename AsyncReadStream::executor_type executor_type;
2920
+
2921
+ explicit initiate_async_read_until_expr_v2(AsyncReadStream& stream)
2922
+ : stream_(stream)
2923
+ {
2924
+ }
2925
+
2926
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
2927
+ {
2928
+ return stream_.get_executor();
2929
+ }
2930
+
2931
+ template <typename ReadHandler, typename DynamicBuffer_v2, typename RegEx>
2932
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
2933
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
2934
+ const RegEx& expr) const
2935
+ {
2936
+ // If you get an error on the following line it means that your handler
2937
+ // does not meet the documented type requirements for a ReadHandler.
2938
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
2939
+
2940
+ non_const_lvalue<ReadHandler> handler2(handler);
2941
+ read_until_expr_op_v2<AsyncReadStream,
2942
+ typename decay<DynamicBuffer_v2>::type,
2943
+ RegEx, typename decay<ReadHandler>::type>(
2944
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
2945
+ expr, handler2.value)(boost::system::error_code(), 0, 1);
2946
+ }
2947
+
2948
+ private:
2949
+ AsyncReadStream& stream_;
2950
+ };
1117
2951
  } // namespace detail
1118
2952
 
1119
2953
  #if !defined(GENERATING_DOCUMENTATION)
1120
2954
 
1121
- template <typename AsyncReadStream, typename DynamicBuffer,
2955
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1122
2956
  typename RegEx, typename ReadHandler, typename Allocator>
1123
2957
  struct associated_allocator<
1124
- detail::read_until_expr_op<AsyncReadStream,
1125
- DynamicBuffer, RegEx, ReadHandler>,
2958
+ detail::read_until_expr_op_v2<AsyncReadStream,
2959
+ DynamicBuffer_v2, RegEx, ReadHandler>,
1126
2960
  Allocator>
1127
2961
  {
1128
2962
  typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1129
2963
 
1130
2964
  static type get(
1131
- const detail::read_until_expr_op<AsyncReadStream,
1132
- DynamicBuffer, RegEx, ReadHandler>& h,
2965
+ const detail::read_until_expr_op_v2<AsyncReadStream,
2966
+ DynamicBuffer_v2, RegEx, ReadHandler>& h,
1133
2967
  const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1134
2968
  {
1135
2969
  return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1136
2970
  }
1137
2971
  };
1138
2972
 
1139
- template <typename AsyncReadStream, typename DynamicBuffer,
2973
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1140
2974
  typename RegEx, typename ReadHandler, typename Executor>
1141
2975
  struct associated_executor<
1142
- detail::read_until_expr_op<AsyncReadStream,
1143
- DynamicBuffer, RegEx, ReadHandler>,
2976
+ detail::read_until_expr_op_v2<AsyncReadStream,
2977
+ DynamicBuffer_v2, RegEx, ReadHandler>,
1144
2978
  Executor>
2979
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1145
2980
  {
1146
2981
  typedef typename associated_executor<ReadHandler, Executor>::type type;
1147
2982
 
1148
2983
  static type get(
1149
- const detail::read_until_expr_op<AsyncReadStream,
1150
- DynamicBuffer, RegEx, ReadHandler>& h,
2984
+ const detail::read_until_expr_op_v2<AsyncReadStream,
2985
+ DynamicBuffer_v2, RegEx, ReadHandler>& h,
1151
2986
  const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1152
2987
  {
1153
2988
  return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -1156,43 +2991,34 @@ struct associated_executor<
1156
2991
 
1157
2992
  #endif // !defined(GENERATING_DOCUMENTATION)
1158
2993
 
1159
- template <typename AsyncReadStream,
1160
- typename DynamicBuffer, typename ReadHandler>
1161
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
2994
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
2995
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
2996
+ std::size_t)) ReadHandler>
2997
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1162
2998
  void (boost::system::error_code, std::size_t))
1163
- async_read_until(AsyncReadStream& s,
1164
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
1165
- const boost::regex& expr,
1166
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
2999
+ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
3000
+ const boost::regex& expr, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
3001
+ typename enable_if<
3002
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
3003
+ >::type*)
1167
3004
  {
1168
- // If you get an error on the following line it means that your handler does
1169
- // not meet the documented type requirements for a ReadHandler.
1170
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1171
-
1172
- async_completion<ReadHandler,
1173
- void (boost::system::error_code, std::size_t)> init(handler);
1174
-
1175
- detail::read_until_expr_op<AsyncReadStream,
1176
- typename decay<DynamicBuffer>::type,
1177
- boost::regex, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
1178
- void (boost::system::error_code, std::size_t))>(
1179
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
1180
- expr, init.completion_handler)(boost::system::error_code(), 0, 1);
1181
-
1182
- return init.result.get();
3005
+ return async_initiate<ReadHandler,
3006
+ void (boost::system::error_code, std::size_t)>(
3007
+ detail::initiate_async_read_until_expr_v2<AsyncReadStream>(s),
3008
+ handler, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr);
1183
3009
  }
1184
3010
 
1185
3011
  #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
1186
3012
 
1187
3013
  namespace detail
1188
3014
  {
1189
- template <typename AsyncReadStream, typename DynamicBuffer,
3015
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1190
3016
  typename MatchCondition, typename ReadHandler>
1191
- class read_until_match_op
3017
+ class read_until_match_op_v2
1192
3018
  {
1193
3019
  public:
1194
3020
  template <typename BufferSequence>
1195
- read_until_match_op(AsyncReadStream& stream,
3021
+ read_until_match_op_v2(AsyncReadStream& stream,
1196
3022
  BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
1197
3023
  MatchCondition match_condition, ReadHandler& handler)
1198
3024
  : stream_(stream),
@@ -1200,27 +3026,30 @@ namespace detail
1200
3026
  match_condition_(match_condition),
1201
3027
  start_(0),
1202
3028
  search_position_(0),
3029
+ bytes_to_read_(0),
1203
3030
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
1204
3031
  {
1205
3032
  }
1206
3033
 
1207
3034
  #if defined(BOOST_ASIO_HAS_MOVE)
1208
- read_until_match_op(const read_until_match_op& other)
3035
+ read_until_match_op_v2(const read_until_match_op_v2& other)
1209
3036
  : stream_(other.stream_),
1210
3037
  buffers_(other.buffers_),
1211
3038
  match_condition_(other.match_condition_),
1212
3039
  start_(other.start_),
1213
3040
  search_position_(other.search_position_),
3041
+ bytes_to_read_(other.bytes_to_read_),
1214
3042
  handler_(other.handler_)
1215
3043
  {
1216
3044
  }
1217
3045
 
1218
- read_until_match_op(read_until_match_op&& other)
3046
+ read_until_match_op_v2(read_until_match_op_v2&& other)
1219
3047
  : stream_(other.stream_),
1220
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
3048
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
1221
3049
  match_condition_(other.match_condition_),
1222
3050
  start_(other.start_),
1223
3051
  search_position_(other.search_position_),
3052
+ bytes_to_read_(other.bytes_to_read_),
1224
3053
  handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
1225
3054
  {
1226
3055
  }
@@ -1230,7 +3059,7 @@ namespace detail
1230
3059
  std::size_t bytes_transferred, int start = 0)
1231
3060
  {
1232
3061
  const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
1233
- std::size_t bytes_to_read;
3062
+ std::size_t pos;
1234
3063
  switch (start_ = start)
1235
3064
  {
1236
3065
  case 1:
@@ -1238,10 +3067,12 @@ namespace detail
1238
3067
  {
1239
3068
  {
1240
3069
  // Determine the range of the data to be searched.
1241
- typedef typename DynamicBuffer::const_buffers_type
3070
+ typedef typename DynamicBuffer_v2::const_buffers_type
1242
3071
  buffers_type;
1243
3072
  typedef buffers_iterator<buffers_type> iterator;
1244
- buffers_type data_buffers = buffers_.data();
3073
+ buffers_type data_buffers =
3074
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
3075
+ 0, buffers_.size());
1245
3076
  iterator begin = iterator::begin(data_buffers);
1246
3077
  iterator start_pos = begin + search_position_;
1247
3078
  iterator end = iterator::end(data_buffers);
@@ -1252,14 +3083,14 @@ namespace detail
1252
3083
  {
1253
3084
  // Full match. We're done.
1254
3085
  search_position_ = result.first - begin;
1255
- bytes_to_read = 0;
3086
+ bytes_to_read_ = 0;
1256
3087
  }
1257
3088
 
1258
3089
  // No match yet. Check if buffer is full.
1259
3090
  else if (buffers_.size() == buffers_.max_size())
1260
3091
  {
1261
3092
  search_position_ = not_found;
1262
- bytes_to_read = 0;
3093
+ bytes_to_read_ = 0;
1263
3094
  }
1264
3095
 
1265
3096
  // Need to read some more data.
@@ -1277,7 +3108,7 @@ namespace detail
1277
3108
  search_position_ = end - begin;
1278
3109
  }
1279
3110
 
1280
- bytes_to_read = std::min<std::size_t>(
3111
+ bytes_to_read_ = std::min<std::size_t>(
1281
3112
  std::max<std::size_t>(512,
1282
3113
  buffers_.capacity() - buffers_.size()),
1283
3114
  std::min<std::size_t>(65536,
@@ -1286,14 +3117,20 @@ namespace detail
1286
3117
  }
1287
3118
 
1288
3119
  // Check if we're done.
1289
- if (!start && bytes_to_read == 0)
3120
+ if (!start && bytes_to_read_ == 0)
1290
3121
  break;
1291
3122
 
1292
3123
  // Start a new asynchronous read operation to obtain more data.
1293
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
1294
- BOOST_ASIO_MOVE_CAST(read_until_match_op)(*this));
3124
+ pos = buffers_.size();
3125
+ buffers_.grow(bytes_to_read_);
3126
+ {
3127
+ BOOST_ASIO_HANDLER_LOCATION((
3128
+ __FILE__, __LINE__, "async_read_until"));
3129
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
3130
+ BOOST_ASIO_MOVE_CAST(read_until_match_op_v2)(*this));
3131
+ }
1295
3132
  return; default:
1296
- buffers_.commit(bytes_transferred);
3133
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
1297
3134
  if (ec || bytes_transferred == 0)
1298
3135
  break;
1299
3136
  }
@@ -1312,37 +3149,48 @@ namespace detail
1312
3149
 
1313
3150
  //private:
1314
3151
  AsyncReadStream& stream_;
1315
- DynamicBuffer buffers_;
3152
+ DynamicBuffer_v2 buffers_;
1316
3153
  MatchCondition match_condition_;
1317
3154
  int start_;
1318
3155
  std::size_t search_position_;
3156
+ std::size_t bytes_to_read_;
1319
3157
  ReadHandler handler_;
1320
3158
  };
1321
3159
 
1322
- template <typename AsyncReadStream, typename DynamicBuffer,
3160
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1323
3161
  typename MatchCondition, typename ReadHandler>
1324
- inline void* asio_handler_allocate(std::size_t size,
1325
- read_until_match_op<AsyncReadStream, DynamicBuffer,
3162
+ inline asio_handler_allocate_is_deprecated
3163
+ asio_handler_allocate(std::size_t size,
3164
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
1326
3165
  MatchCondition, ReadHandler>* this_handler)
1327
3166
  {
3167
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
3168
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
3169
+ return asio_handler_allocate_is_no_longer_used();
3170
+ #else // defined(BOOST_ASIO_NO_DEPRECATED)
1328
3171
  return boost_asio_handler_alloc_helpers::allocate(
1329
3172
  size, this_handler->handler_);
3173
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1330
3174
  }
1331
3175
 
1332
- template <typename AsyncReadStream, typename DynamicBuffer,
3176
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1333
3177
  typename MatchCondition, typename ReadHandler>
1334
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
1335
- read_until_match_op<AsyncReadStream, DynamicBuffer,
3178
+ inline asio_handler_deallocate_is_deprecated
3179
+ asio_handler_deallocate(void* pointer, std::size_t size,
3180
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
1336
3181
  MatchCondition, ReadHandler>* this_handler)
1337
3182
  {
1338
3183
  boost_asio_handler_alloc_helpers::deallocate(
1339
3184
  pointer, size, this_handler->handler_);
3185
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
3186
+ return asio_handler_deallocate_is_no_longer_used();
3187
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1340
3188
  }
1341
3189
 
1342
- template <typename AsyncReadStream, typename DynamicBuffer,
3190
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1343
3191
  typename MatchCondition, typename ReadHandler>
1344
3192
  inline bool asio_handler_is_continuation(
1345
- read_until_match_op<AsyncReadStream, DynamicBuffer,
3193
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
1346
3194
  MatchCondition, ReadHandler>* this_handler)
1347
3195
  {
1348
3196
  return this_handler->start_ == 0 ? true
@@ -1351,60 +3199,107 @@ namespace detail
1351
3199
  }
1352
3200
 
1353
3201
  template <typename Function, typename AsyncReadStream,
1354
- typename DynamicBuffer, typename MatchCondition,
3202
+ typename DynamicBuffer_v2, typename MatchCondition,
1355
3203
  typename ReadHandler>
1356
- inline void asio_handler_invoke(Function& function,
1357
- read_until_match_op<AsyncReadStream, DynamicBuffer,
3204
+ inline asio_handler_invoke_is_deprecated
3205
+ asio_handler_invoke(Function& function,
3206
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
1358
3207
  MatchCondition, ReadHandler>* this_handler)
1359
3208
  {
1360
3209
  boost_asio_handler_invoke_helpers::invoke(
1361
3210
  function, this_handler->handler_);
3211
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
3212
+ return asio_handler_invoke_is_no_longer_used();
3213
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1362
3214
  }
1363
3215
 
1364
3216
  template <typename Function, typename AsyncReadStream,
1365
- typename DynamicBuffer, typename MatchCondition,
3217
+ typename DynamicBuffer_v2, typename MatchCondition,
1366
3218
  typename ReadHandler>
1367
- inline void asio_handler_invoke(const Function& function,
1368
- read_until_match_op<AsyncReadStream, DynamicBuffer,
3219
+ inline asio_handler_invoke_is_deprecated
3220
+ asio_handler_invoke(const Function& function,
3221
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
1369
3222
  MatchCondition, ReadHandler>* this_handler)
1370
3223
  {
1371
3224
  boost_asio_handler_invoke_helpers::invoke(
1372
3225
  function, this_handler->handler_);
3226
+ #if defined(BOOST_ASIO_NO_DEPRECATED)
3227
+ return asio_handler_invoke_is_no_longer_used();
3228
+ #endif // defined(BOOST_ASIO_NO_DEPRECATED)
1373
3229
  }
3230
+
3231
+ template <typename AsyncReadStream>
3232
+ class initiate_async_read_until_match_v2
3233
+ {
3234
+ public:
3235
+ typedef typename AsyncReadStream::executor_type executor_type;
3236
+
3237
+ explicit initiate_async_read_until_match_v2(AsyncReadStream& stream)
3238
+ : stream_(stream)
3239
+ {
3240
+ }
3241
+
3242
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
3243
+ {
3244
+ return stream_.get_executor();
3245
+ }
3246
+
3247
+ template <typename ReadHandler,
3248
+ typename DynamicBuffer_v2, typename MatchCondition>
3249
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
3250
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
3251
+ MatchCondition match_condition) const
3252
+ {
3253
+ // If you get an error on the following line it means that your handler
3254
+ // does not meet the documented type requirements for a ReadHandler.
3255
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
3256
+
3257
+ non_const_lvalue<ReadHandler> handler2(handler);
3258
+ read_until_match_op_v2<AsyncReadStream,
3259
+ typename decay<DynamicBuffer_v2>::type,
3260
+ MatchCondition, typename decay<ReadHandler>::type>(
3261
+ stream_, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
3262
+ match_condition, handler2.value)(boost::system::error_code(), 0, 1);
3263
+ }
3264
+
3265
+ private:
3266
+ AsyncReadStream& stream_;
3267
+ };
1374
3268
  } // namespace detail
1375
3269
 
1376
3270
  #if !defined(GENERATING_DOCUMENTATION)
1377
3271
 
1378
- template <typename AsyncReadStream, typename DynamicBuffer,
3272
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1379
3273
  typename MatchCondition, typename ReadHandler, typename Allocator>
1380
3274
  struct associated_allocator<
1381
- detail::read_until_match_op<AsyncReadStream,
1382
- DynamicBuffer, MatchCondition, ReadHandler>,
3275
+ detail::read_until_match_op_v2<AsyncReadStream,
3276
+ DynamicBuffer_v2, MatchCondition, ReadHandler>,
1383
3277
  Allocator>
1384
3278
  {
1385
3279
  typedef typename associated_allocator<ReadHandler, Allocator>::type type;
1386
3280
 
1387
3281
  static type get(
1388
- const detail::read_until_match_op<AsyncReadStream,
1389
- DynamicBuffer, MatchCondition, ReadHandler>& h,
3282
+ const detail::read_until_match_op_v2<AsyncReadStream,
3283
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h,
1390
3284
  const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
1391
3285
  {
1392
3286
  return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
1393
3287
  }
1394
3288
  };
1395
3289
 
1396
- template <typename AsyncReadStream, typename DynamicBuffer,
3290
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
1397
3291
  typename MatchCondition, typename ReadHandler, typename Executor>
1398
3292
  struct associated_executor<
1399
- detail::read_until_match_op<AsyncReadStream,
1400
- DynamicBuffer, MatchCondition, ReadHandler>,
3293
+ detail::read_until_match_op_v2<AsyncReadStream,
3294
+ DynamicBuffer_v2, MatchCondition, ReadHandler>,
1401
3295
  Executor>
3296
+ : detail::associated_executor_forwarding_base<ReadHandler, Executor>
1402
3297
  {
1403
3298
  typedef typename associated_executor<ReadHandler, Executor>::type type;
1404
3299
 
1405
3300
  static type get(
1406
- const detail::read_until_match_op<AsyncReadStream,
1407
- DynamicBuffer, MatchCondition, ReadHandler>& h,
3301
+ const detail::read_until_match_op_v2<AsyncReadStream,
3302
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h,
1408
3303
  const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
1409
3304
  {
1410
3305
  return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@@ -1413,87 +3308,25 @@ struct associated_executor<
1413
3308
 
1414
3309
  #endif // !defined(GENERATING_DOCUMENTATION)
1415
3310
 
1416
- template <typename AsyncReadStream, typename DynamicBuffer,
1417
- typename MatchCondition, typename ReadHandler>
1418
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
1419
- void (boost::system::error_code, std::size_t))
1420
- async_read_until(AsyncReadStream& s,
1421
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
1422
- MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1423
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
1424
- {
1425
- // If you get an error on the following line it means that your handler does
1426
- // not meet the documented type requirements for a ReadHandler.
1427
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
1428
-
1429
- async_completion<ReadHandler,
1430
- void (boost::system::error_code, std::size_t)> init(handler);
1431
-
1432
- detail::read_until_match_op<AsyncReadStream,
1433
- typename decay<DynamicBuffer>::type,
1434
- MatchCondition, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
1435
- void (boost::system::error_code, std::size_t))>(
1436
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
1437
- match_condition, init.completion_handler)(
1438
- boost::system::error_code(), 0, 1);
1439
-
1440
- return init.result.get();
1441
- }
1442
-
1443
- #if !defined(BOOST_ASIO_NO_IOSTREAM)
1444
-
1445
- template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
1446
- inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
1447
- void (boost::system::error_code, std::size_t))
1448
- async_read_until(AsyncReadStream& s,
1449
- boost::asio::basic_streambuf<Allocator>& b,
1450
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
1451
- {
1452
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
1453
- delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
1454
- }
1455
-
1456
- template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
1457
- inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
1458
- void (boost::system::error_code, std::size_t))
1459
- async_read_until(AsyncReadStream& s,
1460
- boost::asio::basic_streambuf<Allocator>& b,
1461
- BOOST_ASIO_STRING_VIEW_PARAM delim,
1462
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
1463
- {
1464
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
1465
- delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
1466
- }
1467
-
1468
- #if defined(BOOST_ASIO_HAS_BOOST_REGEX)
1469
-
1470
- template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
1471
- inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
1472
- void (boost::system::error_code, std::size_t))
1473
- async_read_until(AsyncReadStream& s,
1474
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
1475
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
1476
- {
1477
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
1478
- expr, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
1479
- }
1480
-
1481
- #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
1482
-
1483
- template <typename AsyncReadStream, typename Allocator,
1484
- typename MatchCondition, typename ReadHandler>
1485
- inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
3311
+ template <typename AsyncReadStream,
3312
+ typename DynamicBuffer_v2, typename MatchCondition,
3313
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
3314
+ std::size_t)) ReadHandler>
3315
+ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
1486
3316
  void (boost::system::error_code, std::size_t))
1487
- async_read_until(AsyncReadStream& s,
1488
- boost::asio::basic_streambuf<Allocator>& b,
3317
+ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
1489
3318
  MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
1490
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
3319
+ typename enable_if<
3320
+ is_match_condition<MatchCondition>::value
3321
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
3322
+ >::type*)
1491
3323
  {
1492
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
1493
- match_condition, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
3324
+ return async_initiate<ReadHandler,
3325
+ void (boost::system::error_code, std::size_t)>(
3326
+ detail::initiate_async_read_until_match_v2<AsyncReadStream>(s), handler,
3327
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), match_condition);
1494
3328
  }
1495
3329
 
1496
- #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
1497
3330
  #endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
1498
3331
 
1499
3332
  } // namespace asio