passenger 6.0.8 → 6.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1145) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +29 -0
  3. data/CONTRIBUTORS +5 -0
  4. data/src/agent/Core/Config.h +1 -1
  5. data/src/agent/Core/Controller/Config.h +1 -1
  6. data/src/agent/Shared/ApplicationPoolApiKey.h +2 -0
  7. data/src/agent/Watchdog/Config.h +1 -1
  8. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +27 -27
  9. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +1 -1
  10. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +2 -2
  11. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +19 -19
  12. data/src/cxx_supportlib/Constants.h +1 -1
  13. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +2 -0
  14. data/src/cxx_supportlib/FileDescriptor.h +8 -0
  15. data/src/cxx_supportlib/StaticString.h +2 -0
  16. data/src/cxx_supportlib/Utils/HttpConstants.h +1 -1
  17. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/case_conv.hpp +3 -0
  18. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/classification.hpp +2 -0
  19. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format_all.hpp +2 -0
  20. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +1 -1
  21. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +240 -11
  22. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +1 -1
  23. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +5 -5
  24. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +9 -9
  25. data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +1 -1
  26. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +21 -13
  27. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +13 -13
  28. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +1 -1
  29. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +21 -13
  30. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +20 -13
  31. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +18 -18
  32. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +29 -21
  33. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +22 -21
  34. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +58 -51
  35. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +1 -1
  36. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +1 -1
  37. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +20 -13
  38. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +1 -1
  39. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +1 -1
  40. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +16 -16
  41. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +5 -5
  42. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +25 -25
  43. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +1 -1
  44. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
  45. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +1 -1
  46. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
  47. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +1 -1
  48. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
  49. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +1 -1
  50. data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +13 -13
  51. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
  52. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +1 -1
  53. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +19 -19
  54. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +1 -1
  55. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
  56. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +5 -5
  57. data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +3 -3
  58. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +1 -1
  59. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +1 -1
  60. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
  61. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +1 -1
  62. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +1 -1
  63. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +5 -1
  64. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +1 -1
  65. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
  66. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +1 -1
  67. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bulk_executor_op.hpp +1 -1
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +1 -1
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +1 -1
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +1 -1
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +1 -1
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +1 -1
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +1 -1
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +58 -15
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +1 -1
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +1 -1
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +1 -1
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +1 -1
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +1 -1
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +1 -1
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +1 -1
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +1 -1
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +1 -1
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +1 -1
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +1 -1
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +3 -2
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +1 -1
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +1 -1
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +1 -1
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +1 -1
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +1 -1
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +1 -1
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +1 -1
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +1 -1
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +1 -1
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +3 -3
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +1 -1
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +1 -1
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +1 -1
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +1 -1
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +88 -12
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +1 -1
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +1 -1
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +1 -1
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +1 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +1 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +1 -1
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +10 -8
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +1 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +1 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +1 -1
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +1 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +8 -4
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +1 -1
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +1 -1
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +1 -1
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +1 -1
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +1 -1
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +6 -1
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +1 -1
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +1 -1
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +1 -1
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +1 -1
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +1 -1
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +13 -11
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +7 -40
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +25 -1
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +3 -33
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +29 -5
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/thread_context.ipp +37 -0
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +1 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
  144. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -1
  145. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +4 -7
  146. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +1 -1
  147. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +1 -1
  148. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
  149. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +1 -1
  150. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
  151. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +1 -1
  152. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +1 -1
  153. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +1 -1
  154. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +1 -1
  155. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
  156. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +1 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +1 -1
  158. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +1 -1
  159. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
  160. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +1 -1
  161. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
  162. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +1 -1
  165. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
  166. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +1 -1
  167. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +1 -1
  169. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +1 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +1 -1
  171. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +1 -1
  172. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +1 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
  174. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +1 -1
  175. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
  176. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
  177. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
  178. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +1 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
  180. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +7 -1
  181. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +1 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +1 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +1 -1
  184. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +1 -1
  185. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +1 -1
  186. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +1 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +1 -1
  188. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +1 -1
  189. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +1 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +1 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +1 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +1 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +1 -1
  194. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +1 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +1 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +1 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +3 -5
  199. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +11 -2
  200. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +1 -1
  201. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +1 -1
  202. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +3 -3
  203. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +7 -7
  204. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +16 -1
  205. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +2 -5
  206. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +1 -1
  207. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +1 -1
  208. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +1 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
  211. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +1 -1
  212. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +1 -1
  213. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +1 -1
  215. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
  216. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
  217. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +1 -1
  218. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
  219. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +1 -1
  220. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +2 -1
  223. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +1 -1
  225. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +1 -1
  226. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +2 -2
  227. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -1
  230. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -1
  231. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +1 -1
  232. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +8 -1
  233. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +4 -5
  234. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +1 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +5 -5
  236. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +10 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +5 -1
  238. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +9 -2
  239. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
  241. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +1 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
  243. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +1 -1
  244. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +1 -1
  246. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +1 -1
  247. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +9 -1
  249. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +1 -1
  250. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +1 -1
  251. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
  252. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +1 -1
  253. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +1 -1
  254. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +1 -1
  255. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +5 -5
  256. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +1 -1
  257. data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +1 -1
  258. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +107 -19
  259. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +194 -112
  260. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +1 -1
  261. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +283 -83
  262. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +218 -70
  263. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +47 -42
  264. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +287 -90
  265. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +39 -36
  266. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +62 -14
  267. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +29 -9
  268. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_invocable.hpp +1 -1
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +1 -1
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_receiver.hpp +1 -1
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/bulk_sender.hpp +1 -1
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/submit_receiver.hpp +1 -1
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/void_receiver.hpp +1 -1
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +67 -48
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +39 -25
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +1 -1
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/receiver_invocation_error.ipp +1 -1
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +1 -1
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +281 -82
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +62 -14
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +1 -1
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +216 -70
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +7 -3
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +1 -1
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver_invocation_error.hpp +1 -1
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +215 -70
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +14 -17
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +1 -1
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +1 -1
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +7 -10
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +7 -10
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +7 -10
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +7 -10
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +21 -21
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +1 -1
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +1 -1
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +34 -19
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_single.hpp +137 -0
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +245 -0
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +1 -1
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +1 -1
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +1 -1
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +1 -1
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +1 -1
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +1 -1
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +1 -1
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +1 -1
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +1 -1
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +4 -4
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +3 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +3 -1
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +13 -13
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/compose.hpp +4 -2
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +19 -19
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +13 -9
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +1 -1
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +13 -9
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +1 -1
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +1 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +1 -1
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +1 -2
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +1 -1
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +3 -3
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +6 -2
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +1 -1
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +1 -1
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +13 -9
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +56 -44
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +2 -2
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +106 -70
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +2 -1
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +1 -1
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +8 -7
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +2 -1
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +1 -1
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +1 -1
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +1 -2
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +6 -2
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +1 -1
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +14 -14
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +1 -1
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +56 -44
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +2 -2
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +21 -1
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +1 -1
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +1 -1
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +1 -1
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +23 -1
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +21 -1
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +1 -1
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +1 -1
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +47 -6
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +1 -1
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +1 -1
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +1 -1
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +32 -5
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +51 -5
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +1 -1
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +1 -1
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +1 -1
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +1 -1
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +1 -1
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +1 -1
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +1 -1
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +1 -1
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +1 -1
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +1 -1
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +1 -1
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +1 -1
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +2 -2
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +1 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +1 -1
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +1 -1
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +1 -1
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +1 -1
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +1 -1
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +1 -1
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +1 -1
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +1 -1
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +1 -1
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +1 -1
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +1 -1
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +1 -1
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +1 -1
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +1 -1
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +1 -1
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +1 -1
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +1 -1
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +1 -1
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +1 -1
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +1 -1
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +1 -1
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +1 -1
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +1 -1
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +1 -1
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +11 -10
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +17 -6
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +1 -1
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +1 -1
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +1 -1
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +5 -5
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +235 -157
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +79 -51
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +55 -43
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +1 -1
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +106 -70
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +1 -1
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +136 -89
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +100 -58
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +1 -1
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +1 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +1 -1
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +1 -1
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +7 -7
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +1 -1
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +1 -1
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +1 -1
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +1 -1
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +1 -1
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +1 -1
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +1 -1
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +1 -1
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +2 -1
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +1 -1
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +1 -1
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +1 -1
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +1 -1
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +1 -1
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +1 -1
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +1 -1
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +1 -1
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +1 -1
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +1 -1
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +1 -1
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1 -1
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +1 -1
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +1 -1
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +1 -1
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +1 -1
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +1 -1
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +1 -1
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +1 -1
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +1 -1
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +1 -1
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +55 -23
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +1 -1
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +23 -1
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +1 -1
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +1 -1
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +21 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_free.hpp +1 -1
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_member.hpp +1 -1
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_free.hpp +1 -1
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_member.hpp +1 -1
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +7 -3
  468. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_free.hpp +1 -1
  469. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +1 -1
  470. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +1 -1
  471. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +1 -1
  472. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +1 -1
  473. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +1 -1
  474. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +1 -1
  475. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +1 -1
  476. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +1 -1
  477. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +1 -1
  478. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +1 -1
  479. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_free.hpp +1 -1
  480. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_member.hpp +1 -1
  481. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_free.hpp +1 -1
  482. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_member.hpp +1 -1
  483. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_free.hpp +1 -1
  484. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_member.hpp +1 -1
  485. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_free.hpp +1 -1
  486. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_member.hpp +1 -1
  487. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_free.hpp +1 -1
  488. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_member.hpp +1 -1
  489. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +1 -1
  490. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +1 -1
  491. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +3 -2
  492. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_free.hpp +1 -1
  493. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_member.hpp +1 -1
  494. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +1 -1
  495. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +1 -1
  496. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +1 -1
  497. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +1 -1
  498. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +1 -1
  499. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +3 -11
  500. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +1 -1
  501. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +1 -1
  502. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
  503. data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +3 -3
  504. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
  505. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
  506. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
  507. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +1 -1
  508. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +10 -10
  509. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +10 -10
  510. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +6 -6
  511. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +6 -6
  512. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +1 -1
  513. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +1 -1
  514. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +9 -9
  515. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +1 -1
  516. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +1 -1
  517. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +55 -43
  518. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +1 -1
  519. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
  520. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +6 -0
  521. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp +6 -6
  522. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_arm.hpp +4 -4
  523. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch32.hpp +32 -32
  524. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch64.hpp +15 -15
  525. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +25 -1
  526. data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +13 -0
  527. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +3 -23
  528. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf2_cc.hpp +18 -18
  529. data/src/cxx_supportlib/vendor-modified/boost/bind/detail/result_traits.hpp +154 -0
  530. data/src/cxx_supportlib/vendor-modified/boost/bind/placeholders.hpp +12 -0
  531. data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +52 -8
  532. data/src/cxx_supportlib/vendor-modified/boost/bind/std_placeholders.hpp +39 -0
  533. data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +4 -320
  534. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +1 -1
  535. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +6 -6
  536. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +2 -2
  537. data/src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp +21 -0
  538. data/src/cxx_supportlib/vendor-modified/boost/concept/usage.hpp +7 -0
  539. data/src/cxx_supportlib/vendor-modified/boost/concept_check.hpp +1 -1
  540. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx03.hpp +214 -0
  541. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx11.hpp +215 -0
  542. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx14.hpp +47 -0
  543. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx17.hpp +59 -0
  544. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx98.hpp +23 -0
  545. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +1 -1
  546. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +11 -0
  547. data/src/cxx_supportlib/vendor-modified/boost/config/detail/cxx_composite.hpp +186 -0
  548. data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +37 -2
  549. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +11 -4
  550. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +21 -1
  551. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +45 -1
  552. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +8 -0
  553. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +10 -7
  554. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +9 -0
  555. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +6 -0
  556. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +123 -71
  557. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +4 -3
  558. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +117 -45
  559. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +28 -0
  560. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +1 -0
  561. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +0 -3
  562. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +3 -3
  563. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +142 -36
  564. data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +100 -31
  565. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +24 -24
  566. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +141 -90
  567. data/src/cxx_supportlib/vendor-modified/boost/container/detail/guards_dended.hpp +198 -0
  568. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_container.hpp +10 -0
  569. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_contiguous_container.hpp +35 -0
  570. data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +12 -8
  571. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +4 -15
  572. data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +22 -1
  573. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +1 -1
  574. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +126 -92
  575. data/src/cxx_supportlib/vendor-modified/boost/container/detail/type_traits.hpp +2 -0
  576. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_functors.hpp +4 -14
  577. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +30 -0
  578. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +3000 -0
  579. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +237 -169
  580. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +10 -28
  581. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +58 -29
  582. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +84 -80
  583. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +41 -0
  584. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/devector.hpp +51 -0
  585. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
  586. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +2 -3
  587. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +21 -35
  588. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +51 -26
  589. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +1 -1
  590. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +109 -57
  591. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +4 -1
  592. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +184 -105
  593. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +123 -15
  594. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +368 -384
  595. data/src/cxx_supportlib/vendor-modified/boost/container_hash/extensions.hpp +1 -3
  596. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +1 -1
  597. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +1 -1
  598. data/src/cxx_supportlib/vendor-modified/boost/core/allocator_access.hpp +102 -134
  599. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +581 -0
  600. data/src/cxx_supportlib/vendor-modified/boost/core/cmath.hpp +199 -0
  601. data/src/cxx_supportlib/vendor-modified/boost/core/detail/splitmix64.hpp +54 -0
  602. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +42 -0
  603. data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +36 -0
  604. data/src/cxx_supportlib/vendor-modified/boost/cregex.hpp +4 -0
  605. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_iterator.hpp +8 -8
  606. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_iterator.hpp +8 -8
  607. data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +21 -0
  608. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +55 -37
  609. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +2 -1
  610. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +0 -3
  611. data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +3 -3
  612. data/src/cxx_supportlib/vendor-modified/boost/integer.hpp +2 -2
  613. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor.hpp +2 -2
  614. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_ct.hpp +2 -2
  615. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +1 -1
  616. data/src/cxx_supportlib/vendor-modified/boost/integer/extended_euclidean.hpp +1 -1
  617. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_log2.hpp +1 -1
  618. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_mask.hpp +2 -2
  619. data/src/cxx_supportlib/vendor-modified/boost/integer/mod_inverse.hpp +1 -1
  620. data/src/cxx_supportlib/vendor-modified/boost/integer/static_log2.hpp +2 -2
  621. data/src/cxx_supportlib/vendor-modified/boost/integer/static_min_max.hpp +2 -2
  622. data/src/cxx_supportlib/vendor-modified/boost/integer_fwd.hpp +2 -2
  623. data/src/cxx_supportlib/vendor-modified/boost/integer_traits.hpp +2 -2
  624. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +8 -16
  625. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +4 -5
  626. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +2 -1
  627. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +1 -2
  628. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash_combine.hpp +94 -0
  629. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/math.hpp +2 -2
  630. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/simple_disposers.hpp +2 -0
  631. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/twin.hpp +49 -0
  632. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/value_functors.hpp +42 -0
  633. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +1 -1
  634. data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +11 -5
  635. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +11 -11
  636. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +7 -15
  637. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +18 -22
  638. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +2 -4
  639. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +2 -2
  640. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +7 -7
  641. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +1 -1
  642. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +38 -38
  643. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +1 -1
  644. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +13 -16
  645. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +1 -1
  646. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +2 -2
  647. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +10 -10
  648. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +1 -1
  649. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +5 -5
  650. data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +1 -1
  651. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +3 -7
  652. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +10 -121
  653. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +5 -1
  654. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +4 -8
  655. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +2 -4
  656. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +3 -2
  657. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +31 -14
  658. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +4 -48
  659. data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +30 -3
  660. data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +12 -0
  661. data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +224 -0
  662. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +253 -43
  663. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +0 -26
  664. data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +5 -5
  665. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/enum.hpp +12 -0
  666. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/params.hpp +12 -0
  667. data/src/cxx_supportlib/vendor-modified/boost/mpl/has_xxx.hpp +2 -2
  668. data/src/cxx_supportlib/vendor-modified/boost/mpl/string.hpp +6 -6
  669. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +3 -4
  670. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +3 -1
  671. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/cast.hpp +1 -1
  672. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/converter_policies.hpp +4 -5
  673. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/converter.hpp +1 -1
  674. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/meta.hpp +1 -1
  675. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +2 -2
  676. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +1 -1
  677. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +8 -1
  678. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/arg_list.hpp +5 -5
  679. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/default.hpp +11 -0
  680. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/maybe.hpp +2 -2
  681. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/name.hpp +1 -1
  682. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/item.hpp +2 -2
  683. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/make_arg_list.hpp +4 -4
  684. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp +2 -2
  685. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_cast.hpp +1 -1
  686. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/function_forward_match.hpp +1 -1
  687. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/impl/specification.hpp +2 -2
  688. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/is_binary.hpp +1 -1
  689. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/is_nullary.hpp +1 -1
  690. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/set.hpp +1 -1
  691. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tag.hpp +2 -2
  692. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tagged_argument.hpp +12 -3
  693. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +3 -3
  694. data/src/cxx_supportlib/vendor-modified/boost/parameter/config.hpp +1 -1
  695. data/src/cxx_supportlib/vendor-modified/boost/parameter/macros.hpp +1 -1
  696. data/src/cxx_supportlib/vendor-modified/boost/parameter/match.hpp +1 -1
  697. data/src/cxx_supportlib/vendor-modified/boost/parameter/parameters.hpp +6 -6
  698. data/src/cxx_supportlib/vendor-modified/boost/pool/object_pool.hpp +2 -2
  699. data/src/cxx_supportlib/vendor-modified/boost/pool/pool_alloc.hpp +1 -1
  700. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture.h +1 -1
  701. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/alpha.h +5 -0
  702. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +10 -0
  703. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/blackfin.h +5 -0
  704. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/convex.h +5 -0
  705. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/e2k.h +54 -0
  706. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ia64.h +5 -0
  707. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/m68k.h +5 -0
  708. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/mips.h +10 -0
  709. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/parisc.h +5 -0
  710. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ppc.h +55 -4
  711. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ptx.h +5 -0
  712. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/pyramid.h +5 -0
  713. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/riscv.h +5 -0
  714. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/rs6k.h +10 -0
  715. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sparc.h +14 -2
  716. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/superh.h +13 -0
  717. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys370.h +5 -0
  718. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys390.h +5 -0
  719. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/32.h +5 -0
  720. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/64.h +7 -2
  721. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/z.h +5 -0
  722. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/cxx.h +1 -1
  723. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stdcpp3.h +1 -1
  724. data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +4 -0
  725. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/bsdi.h +1 -0
  726. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/dragonfly.h +1 -0
  727. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/free.h +1 -0
  728. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/net.h +1 -0
  729. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/open.h +1 -0
  730. data/src/cxx_supportlib/vendor-modified/boost/predef/other.h +3 -2
  731. data/src/cxx_supportlib/vendor-modified/boost/predef/other/endian.h +7 -10
  732. data/src/cxx_supportlib/vendor-modified/boost/predef/other/wordsize.h +73 -0
  733. data/src/cxx_supportlib/vendor-modified/boost/predef/platform.h +0 -1
  734. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
  735. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/add.hpp +54 -1
  736. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/dec.hpp +33 -0
  737. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/detail/is_1_number.hpp +21 -0
  738. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp +22 -0
  739. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp +21 -0
  740. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/detail/maximum_number.hpp +19 -0
  741. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/div.hpp +37 -1
  742. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/inc.hpp +33 -0
  743. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/dec_1024.hpp +531 -0
  744. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/dec_256.hpp +276 -0
  745. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/dec_512.hpp +275 -0
  746. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/inc_1024.hpp +536 -0
  747. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/inc_256.hpp +275 -0
  748. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/limits/inc_512.hpp +280 -0
  749. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/mod.hpp +37 -1
  750. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/mul.hpp +60 -1
  751. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/sub.hpp +51 -1
  752. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/detail/get_data.hpp +1 -1
  753. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/enum.hpp +17 -1
  754. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/insert.hpp +71 -0
  755. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/remove.hpp +66 -0
  756. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/replace.hpp +58 -0
  757. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/comparison/limits/not_equal_1024.hpp +1044 -0
  758. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/comparison/limits/not_equal_256.hpp +793 -0
  759. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/comparison/limits/not_equal_512.hpp +532 -0
  760. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/comparison/not_equal.hpp +44 -1
  761. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +16 -33
  762. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/limits.hpp +136 -3
  763. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/deduce_d.hpp +27 -0
  764. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/dmc/while.hpp +2 -3
  765. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/edg/limits/while_1024.hpp +1044 -0
  766. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/edg/limits/while_256.hpp +533 -0
  767. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/edg/limits/while_512.hpp +532 -0
  768. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/edg/while.hpp +27 -0
  769. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/limits/while_1024.hpp +1044 -0
  770. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/limits/while_256.hpp +533 -0
  771. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/limits/while_512.hpp +532 -0
  772. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/detail/while.hpp +27 -0
  773. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/limits/while_1024.hpp +531 -0
  774. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/limits/while_256.hpp +275 -0
  775. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/limits/while_512.hpp +275 -0
  776. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/control/while.hpp +75 -0
  777. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/detail/auto_rec.hpp +41 -0
  778. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/detail/dmc/auto_rec.hpp +2 -2
  779. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/detail/limits/auto_rec_1024.hpp +532 -0
  780. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/detail/limits/auto_rec_256.hpp +280 -0
  781. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/detail/limits/auto_rec_512.hpp +276 -0
  782. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/intercept.hpp +29 -0
  783. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty.hpp +0 -37
  784. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_variadic.hpp +0 -4
  785. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/limits/intercept_1024.hpp +530 -0
  786. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/limits/intercept_256.hpp +273 -0
  787. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/limits/intercept_512.hpp +274 -0
  788. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/overload.hpp +1 -3
  789. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/forward1.hpp +27 -0
  790. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/forward2.hpp +27 -0
  791. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/forward3.hpp +27 -0
  792. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/forward4.hpp +27 -0
  793. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/forward5.hpp +27 -0
  794. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward1_1024.hpp +2573 -0
  795. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp +1296 -0
  796. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward1_512.hpp +1293 -0
  797. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward2_1024.hpp +2573 -0
  798. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward2_256.hpp +1296 -0
  799. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward2_512.hpp +1293 -0
  800. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward3_1024.hpp +2573 -0
  801. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward3_256.hpp +1296 -0
  802. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward3_512.hpp +1293 -0
  803. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward4_1024.hpp +2573 -0
  804. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward4_256.hpp +1296 -0
  805. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward4_512.hpp +1293 -0
  806. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward5_1024.hpp +2573 -0
  807. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward5_256.hpp +1296 -0
  808. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/forward5_512.hpp +1293 -0
  809. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse1_1024.hpp +2571 -0
  810. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse1_256.hpp +1296 -0
  811. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse1_512.hpp +1291 -0
  812. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse2_1024.hpp +2571 -0
  813. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse2_256.hpp +1296 -0
  814. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse2_512.hpp +1293 -0
  815. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse3_1024.hpp +2571 -0
  816. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse3_256.hpp +1296 -0
  817. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse3_512.hpp +1293 -0
  818. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse4_1024.hpp +2571 -0
  819. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse4_256.hpp +1296 -0
  820. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse4_512.hpp +1293 -0
  821. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse5_1024.hpp +2571 -0
  822. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse5_256.hpp +1296 -0
  823. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/limits/reverse5_512.hpp +1293 -0
  824. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/reverse1.hpp +25 -0
  825. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/reverse2.hpp +25 -0
  826. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/reverse3.hpp +25 -0
  827. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/reverse4.hpp +25 -0
  828. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/iter/reverse5.hpp +25 -0
  829. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/local_1024.hpp +1549 -0
  830. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/local_256.hpp +782 -0
  831. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/local_512.hpp +781 -0
  832. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/rlocal_1024.hpp +1549 -0
  833. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/rlocal_256.hpp +782 -0
  834. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/limits/rlocal_512.hpp +781 -0
  835. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/local.hpp +27 -0
  836. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/iteration/detail/rlocal.hpp +25 -0
  837. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/dmc/fold_left.hpp +3 -2
  838. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/fold_left.hpp +28 -0
  839. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/fold_right.hpp +29 -0
  840. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_left_1024.hpp +1044 -0
  841. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_left_256.hpp +533 -0
  842. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_left_512.hpp +532 -0
  843. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_right_1024.hpp +1557 -0
  844. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_right_256.hpp +791 -0
  845. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/edg/limits/fold_right_512.hpp +789 -0
  846. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/fold_left.hpp +28 -0
  847. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/fold_right.hpp +26 -0
  848. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_left_1024.hpp +532 -0
  849. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_left_256.hpp +275 -0
  850. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_left_512.hpp +276 -0
  851. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_right_1024.hpp +532 -0
  852. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_right_256.hpp +275 -0
  853. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/detail/limits/fold_right_512.hpp +276 -0
  854. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/enum.hpp +13 -1
  855. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/fold_left.hpp +60 -0
  856. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/fold_right.hpp +44 -0
  857. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/for_each_product.hpp +25 -6
  858. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/limits/fold_left_1024.hpp +531 -0
  859. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/limits/fold_left_256.hpp +275 -0
  860. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/limits/fold_left_512.hpp +275 -0
  861. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/reverse.hpp +35 -0
  862. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/size.hpp +56 -1
  863. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_array.hpp +5 -72
  864. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/logical/bool.hpp +22 -0
  865. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/logical/limits/bool_1024.hpp +531 -0
  866. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/logical/limits/bool_256.hpp +275 -0
  867. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/logical/limits/bool_512.hpp +275 -0
  868. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/is_begin_parens.hpp +1 -5
  869. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/remove_parens.hpp +0 -4
  870. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/deduce_r.hpp +27 -0
  871. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/dmc/for.hpp +3 -2
  872. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/edg/for.hpp +26 -0
  873. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/edg/limits/for_1024.hpp +1044 -0
  874. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/edg/limits/for_256.hpp +533 -0
  875. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/edg/limits/for_512.hpp +532 -0
  876. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/for.hpp +28 -0
  877. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/limits/for_1024.hpp +1044 -0
  878. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/limits/for_256.hpp +533 -0
  879. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/limits/for_512.hpp +532 -0
  880. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/detail/msvc/for.hpp +1 -0
  881. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/for.hpp +114 -0
  882. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/for_1024.hpp +531 -0
  883. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/for_256.hpp +275 -0
  884. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/for_512.hpp +275 -0
  885. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/repeat_1024.hpp +1557 -0
  886. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/repeat_256.hpp +791 -0
  887. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/limits/repeat_512.hpp +789 -0
  888. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/repeat.hpp +22 -0
  889. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/repeat_from_to.hpp +27 -0
  890. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +6 -11
  891. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/limits/split_1024.hpp +530 -0
  892. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/limits/split_256.hpp +272 -0
  893. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/limits/split_512.hpp +274 -0
  894. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/split.hpp +23 -0
  895. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/elem.hpp +23 -0
  896. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/enum.hpp +23 -0
  897. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/fold_left.hpp +52 -0
  898. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/fold_right.hpp +37 -0
  899. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/elem_1024.hpp +530 -0
  900. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/elem_256.hpp +272 -0
  901. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/elem_512.hpp +274 -0
  902. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/enum_1024.hpp +530 -0
  903. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/enum_256.hpp +272 -0
  904. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/enum_512.hpp +274 -0
  905. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_left_1024.hpp +1556 -0
  906. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_left_256.hpp +1053 -0
  907. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_left_512.hpp +788 -0
  908. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_right_1024.hpp +530 -0
  909. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_right_256.hpp +273 -0
  910. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/fold_right_512.hpp +274 -0
  911. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/size_1024.hpp +1043 -0
  912. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/size_256.hpp +532 -0
  913. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/limits/size_512.hpp +531 -0
  914. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/rest_n.hpp +9 -3
  915. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/size.hpp +23 -0
  916. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/variadic_seq_to_seq.hpp +0 -2
  917. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/stringize.hpp +0 -4
  918. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/detail/is_single_return.hpp +2 -2
  919. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/eat.hpp +4 -18
  920. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/elem.hpp +11 -157
  921. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/insert.hpp +0 -5
  922. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/reverse_128.hpp +403 -0
  923. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/reverse_256.hpp +1171 -0
  924. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/reverse_64.hpp +83 -0
  925. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_list_128.hpp +595 -0
  926. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_list_256.hpp +1747 -0
  927. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_list_64.hpp +83 -0
  928. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_seq_128.hpp +403 -0
  929. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_seq_256.hpp +1171 -0
  930. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_seq_64.hpp +84 -0
  931. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_back.hpp +0 -5
  932. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_front.hpp +0 -5
  933. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_back.hpp +0 -5
  934. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_front.hpp +0 -6
  935. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/rem.hpp +17 -39
  936. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/remove.hpp +0 -5
  937. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/replace.hpp +0 -5
  938. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/reverse.hpp +38 -25
  939. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/size.hpp +13 -6
  940. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_array.hpp +15 -12
  941. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_list.hpp +37 -25
  942. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_seq.hpp +38 -24
  943. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/has_opt.hpp +1 -1
  944. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/is_single_return.hpp +2 -2
  945. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/elem.hpp +93 -71
  946. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +1 -1
  947. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/elem_128.hpp +275 -0
  948. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/elem_256.hpp +723 -0
  949. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/elem_64.hpp +81 -0
  950. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/size_128.hpp +47 -0
  951. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/size_256.hpp +53 -0
  952. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/limits/size_64.hpp +23 -0
  953. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/size.hpp +39 -4
  954. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/to_array.hpp +15 -9
  955. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/to_list.hpp +9 -2
  956. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/to_seq.hpp +1 -3
  957. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/to_tuple.hpp +1 -3
  958. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/wstringize.hpp +0 -4
  959. data/src/cxx_supportlib/vendor-modified/boost/random.hpp +1 -0
  960. data/src/cxx_supportlib/vendor-modified/boost/random/additive_combine.hpp +2 -2
  961. data/src/cxx_supportlib/vendor-modified/boost/random/detail/gray_coded_qrng.hpp +29 -5
  962. data/src/cxx_supportlib/vendor-modified/boost/random/detail/int_float_pair.hpp +3 -4
  963. data/src/cxx_supportlib/vendor-modified/boost/random/detail/mixmax_skip_N17.ipp +287 -0
  964. data/src/cxx_supportlib/vendor-modified/boost/random/detail/niederreiter_base2_table.hpp +1 -0
  965. data/src/cxx_supportlib/vendor-modified/boost/random/detail/operators.hpp +1 -1
  966. data/src/cxx_supportlib/vendor-modified/boost/random/detail/qrng_base.hpp +5 -5
  967. data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed.hpp +9 -11
  968. data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed_impl.hpp +13 -14
  969. data/src/cxx_supportlib/vendor-modified/boost/random/detail/sobol_table.hpp +1 -0
  970. data/src/cxx_supportlib/vendor-modified/boost/random/discard_block.hpp +2 -2
  971. data/src/cxx_supportlib/vendor-modified/boost/random/generate_canonical.hpp +2 -3
  972. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +3 -3
  973. data/src/cxx_supportlib/vendor-modified/boost/random/independent_bits.hpp +3 -3
  974. data/src/cxx_supportlib/vendor-modified/boost/random/inversive_congruential.hpp +2 -3
  975. data/src/cxx_supportlib/vendor-modified/boost/random/lagged_fibonacci.hpp +4 -4
  976. data/src/cxx_supportlib/vendor-modified/boost/random/linear_congruential.hpp +5 -7
  977. data/src/cxx_supportlib/vendor-modified/boost/random/linear_feedback_shift.hpp +3 -3
  978. data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +2 -2
  979. data/src/cxx_supportlib/vendor-modified/boost/random/mixmax.hpp +313 -0
  980. data/src/cxx_supportlib/vendor-modified/boost/random/niederreiter_base2.hpp +2 -2
  981. data/src/cxx_supportlib/vendor-modified/boost/random/random_device.hpp +2 -2
  982. data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_order.hpp +2 -2
  983. data/src/cxx_supportlib/vendor-modified/boost/random/sobol.hpp +3 -2
  984. data/src/cxx_supportlib/vendor-modified/boost/random/subtract_with_carry.hpp +4 -4
  985. data/src/cxx_supportlib/vendor-modified/boost/random/traits.hpp +3 -3
  986. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +7 -7
  987. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real_distribution.hpp +2 -3
  988. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_smallint.hpp +4 -5
  989. data/src/cxx_supportlib/vendor-modified/boost/random/xor_combine.hpp +4 -2
  990. data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +7 -7
  991. data/src/cxx_supportlib/vendor-modified/boost/regex.hpp +4 -0
  992. data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +78 -73
  993. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +97 -113
  994. data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +4 -75
  995. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/object_cache.hpp +4 -147
  996. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +8 -761
  997. data/src/cxx_supportlib/vendor-modified/boost/regex/regex_traits.hpp +4 -0
  998. data/src/cxx_supportlib/vendor-modified/boost/regex/user.hpp +2 -0
  999. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +8 -9
  1000. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +20 -19
  1001. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +13 -13
  1002. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/c_regex_traits.hpp +342 -42
  1003. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +107 -24
  1004. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +0 -117
  1005. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/icu.hpp +1516 -0
  1006. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +5 -5
  1007. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +8 -8
  1008. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +39 -1
  1009. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/object_cache.hpp +171 -0
  1010. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/pattern_except.hpp +127 -0
  1011. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +13 -4
  1012. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +1 -1
  1013. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +39 -41
  1014. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +6 -6
  1015. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/primary_transform.hpp +1 -1
  1016. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/protected_call.hpp +3 -1
  1017. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex.hpp +0 -36
  1018. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +3 -3
  1019. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +35 -4
  1020. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +2 -0
  1021. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +638 -22
  1022. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/states.hpp +1 -1
  1023. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/unicode_iterator.hpp +790 -0
  1024. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +521 -37
  1025. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex.hpp +734 -0
  1026. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_creator.hpp +1575 -0
  1027. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_parser.hpp +3117 -0
  1028. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/c_regex_traits.hpp +474 -0
  1029. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/char_regex_traits.hpp +59 -0
  1030. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cpp_regex_traits.hpp +1040 -0
  1031. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cregex.hpp +195 -0
  1032. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/error_type.hpp +59 -0
  1033. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +1402 -0
  1034. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/indexed_bit_flag.hpp +54 -0
  1035. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_category.hpp +84 -0
  1036. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_traits.hpp +32 -0
  1037. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_flags.hpp +156 -0
  1038. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_results.hpp +667 -0
  1039. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/mem_block_cache.hpp +175 -0
  1040. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/object_cache.hpp +160 -0
  1041. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/pattern_except.hpp +105 -0
  1042. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher.hpp +576 -0
  1043. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_common.hpp +915 -0
  1044. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_non_recursive.hpp +1872 -0
  1045. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/primary_transform.hpp +120 -0
  1046. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regbase.hpp +158 -0
  1047. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex.hpp +106 -0
  1048. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_format.hpp +1124 -0
  1049. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_fwd.hpp +73 -0
  1050. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_grep.hpp +98 -0
  1051. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_iterator.hpp +173 -0
  1052. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_match.hpp +92 -0
  1053. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_merge.hpp +71 -0
  1054. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_raw_buffer.hpp +213 -0
  1055. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_replace.hpp +77 -0
  1056. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_search.hpp +103 -0
  1057. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_split.hpp +152 -0
  1058. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_token_iterator.hpp +255 -0
  1059. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_traits.hpp +130 -0
  1060. data/src/cxx_supportlib/vendor-modified/boost/{libs/regex/src/regex_traits_defaults.cpp → regex/v5/regex_traits_defaults.hpp} +719 -415
  1061. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +159 -0
  1062. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/states.hpp +299 -0
  1063. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/sub_match.hpp +382 -0
  1064. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/syntax_type.hpp +105 -0
  1065. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_iterator.hpp +177 -0
  1066. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_token_iterator.hpp +312 -0
  1067. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/unicode_iterator.hpp +864 -0
  1068. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/w32_regex_traits.hpp +1176 -0
  1069. data/src/cxx_supportlib/vendor-modified/boost/regex_fwd.hpp +4 -0
  1070. data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +1 -1
  1071. data/src/cxx_supportlib/vendor-modified/boost/system/detail/cerrno.hpp +329 -0
  1072. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +16 -0
  1073. data/src/cxx_supportlib/vendor-modified/boost/system/detail/enable_if.hpp +32 -0
  1074. data/src/cxx_supportlib/vendor-modified/boost/system/detail/errc.hpp +126 -0
  1075. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +189 -0
  1076. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +108 -0
  1077. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +215 -0
  1078. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_condition.hpp +163 -0
  1079. data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category.hpp +80 -58
  1080. data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category_message.hpp +108 -0
  1081. data/src/cxx_supportlib/vendor-modified/boost/system/detail/{system_category_posix.hpp → is_generic_value.hpp} +7 -14
  1082. data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category.hpp +110 -0
  1083. data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category_impl.hpp +83 -0
  1084. data/src/cxx_supportlib/vendor-modified/boost/system/detail/throws.hpp +59 -0
  1085. data/src/cxx_supportlib/vendor-modified/boost/system/detail/{std_interoperability.hpp → to_std_category.hpp} +11 -2
  1086. data/src/cxx_supportlib/vendor-modified/boost/system/errc.hpp +50 -0
  1087. data/src/cxx_supportlib/vendor-modified/boost/system/error_category.hpp +13 -0
  1088. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +7 -925
  1089. data/src/cxx_supportlib/vendor-modified/boost/system/error_condition.hpp +13 -0
  1090. data/src/cxx_supportlib/vendor-modified/boost/system/generic_category.hpp +13 -0
  1091. data/src/cxx_supportlib/vendor-modified/boost/system/is_error_code_enum.hpp +30 -0
  1092. data/src/cxx_supportlib/vendor-modified/boost/system/is_error_condition_enum.hpp +30 -0
  1093. data/src/cxx_supportlib/vendor-modified/boost/system/system_category.hpp +14 -0
  1094. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +1 -1
  1095. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +26 -0
  1096. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +37 -39
  1097. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +1 -1
  1098. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +1 -1
  1099. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +1 -1
  1100. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_cxx_11.hpp +247 -168
  1101. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_tester.hpp +27 -27
  1102. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_likely_lambda.hpp +1 -1
  1103. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +27 -27
  1104. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +242 -217
  1105. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_convertible.hpp +1 -1
  1106. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_empty.hpp +1 -1
  1107. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_trivially_copyable.hpp +4 -0
  1108. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +1 -1
  1109. data/src/cxx_supportlib/vendor-modified/boost/typeof/modifiers.hpp +3 -3
  1110. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_fundamental.hpp +2 -2
  1111. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/string.hpp +1 -1
  1112. data/src/cxx_supportlib/vendor-modified/boost/typeof/template_encoding.hpp +1 -1
  1113. data/src/cxx_supportlib/vendor-modified/boost/typeof/template_template_param.hpp +1 -1
  1114. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof.hpp +4 -4
  1115. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +1 -1
  1116. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +8 -8
  1117. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +8 -8
  1118. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  1119. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  1120. data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +3 -0
  1121. data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +5 -0
  1122. metadata +223 -28
  1123. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +0 -25
  1124. data/src/cxx_supportlib/vendor-modified/boost/bind.hpp +0 -60
  1125. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/c_regex_traits.cpp +0 -206
  1126. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cpp_regex_traits.cpp +0 -117
  1127. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cregex.cpp +0 -667
  1128. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/instances.cpp +0 -32
  1129. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_raw_buffer.cpp +0 -72
  1130. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wc_regex_traits.cpp +0 -314
  1131. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/winstances.cpp +0 -35
  1132. data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +0 -1038
  1133. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/fp_traits.hpp +0 -581
  1134. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/round_fwd.hpp +0 -93
  1135. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +0 -640
  1136. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +0 -1712
  1137. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/sign.hpp +0 -194
  1138. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +0 -489
  1139. data/src/cxx_supportlib/vendor-modified/boost/math/tools/promotion.hpp +0 -182
  1140. data/src/cxx_supportlib/vendor-modified/boost/math/tools/real_cast.hpp +0 -31
  1141. data/src/cxx_supportlib/vendor-modified/boost/math/tools/user.hpp +0 -105
  1142. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +0 -557
  1143. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +0 -236
  1144. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp.orig +0 -841
  1145. data/src/cxx_supportlib/vendor-modified/boost/thread/once.hpp.orig +0 -54
@@ -0,0 +1,3117 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 2004
4
+ * John Maddock
5
+ *
6
+ * Use, modification and distribution are subject to the
7
+ * Boost Software License, Version 1.0. (See accompanying file
8
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
+ *
10
+ */
11
+
12
+ /*
13
+ * LOCATION: see http://www.boost.org for most recent version.
14
+ * FILE basic_regex_parser.cpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: Declares template class basic_regex_parser.
17
+ */
18
+
19
+ #ifndef BOOST_REGEX_V5_BASIC_REGEX_PARSER_HPP
20
+ #define BOOST_REGEX_V5_BASIC_REGEX_PARSER_HPP
21
+
22
+ namespace boost{
23
+ namespace BOOST_REGEX_DETAIL_NS{
24
+
25
+ #ifdef BOOST_REGEX_MSVC
26
+ #pragma warning(push)
27
+ #pragma warning(disable:4244 4459)
28
+ #if BOOST_REGEX_MSVC < 1910
29
+ #pragma warning(disable:4800)
30
+ #endif
31
+ #endif
32
+
33
+ inline std::intmax_t umax(std::integral_constant<bool, false> const&)
34
+ {
35
+ // Get out clause here, just in case numeric_limits is unspecialized:
36
+ return std::numeric_limits<std::intmax_t>::is_specialized ? (std::numeric_limits<std::intmax_t>::max)() : INT_MAX;
37
+ }
38
+ inline std::intmax_t umax(std::integral_constant<bool, true> const&)
39
+ {
40
+ return (std::numeric_limits<std::size_t>::max)();
41
+ }
42
+
43
+ inline std::intmax_t umax()
44
+ {
45
+ return umax(std::integral_constant<bool, std::numeric_limits<std::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>());
46
+ }
47
+
48
+ template <class charT, class traits>
49
+ class basic_regex_parser : public basic_regex_creator<charT, traits>
50
+ {
51
+ public:
52
+ basic_regex_parser(regex_data<charT, traits>* data);
53
+ void parse(const charT* p1, const charT* p2, unsigned flags);
54
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position);
55
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos);
56
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message)
57
+ {
58
+ fail(error_code, position, message, position);
59
+ }
60
+
61
+ bool parse_all();
62
+ bool parse_basic();
63
+ bool parse_extended();
64
+ bool parse_literal();
65
+ bool parse_open_paren();
66
+ bool parse_basic_escape();
67
+ bool parse_extended_escape();
68
+ bool parse_match_any();
69
+ bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits<std::size_t>::max)());
70
+ bool parse_repeat_range(bool isbasic);
71
+ bool parse_alt();
72
+ bool parse_set();
73
+ bool parse_backref();
74
+ void parse_set_literal(basic_char_set<charT, traits>& char_set);
75
+ bool parse_inner_set(basic_char_set<charT, traits>& char_set);
76
+ bool parse_QE();
77
+ bool parse_perl_extension();
78
+ bool parse_perl_verb();
79
+ bool match_verb(const char*);
80
+ bool add_emacs_code(bool negate);
81
+ bool unwind_alts(std::ptrdiff_t last_paren_start);
82
+ digraph<charT> get_next_set_literal(basic_char_set<charT, traits>& char_set);
83
+ charT unescape_character();
84
+ regex_constants::syntax_option_type parse_options();
85
+
86
+ private:
87
+ typedef bool (basic_regex_parser::*parser_proc_type)();
88
+ typedef typename traits::string_type string_type;
89
+ typedef typename traits::char_class_type char_class_type;
90
+ parser_proc_type m_parser_proc; // the main parser to use
91
+ const charT* m_base; // the start of the string being parsed
92
+ const charT* m_end; // the end of the string being parsed
93
+ const charT* m_position; // our current parser position
94
+ unsigned m_mark_count; // how many sub-expressions we have
95
+ int m_mark_reset; // used to indicate that we're inside a (?|...) block.
96
+ unsigned m_max_mark; // largest mark count seen inside a (?|...) block.
97
+ std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted).
98
+ std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative
99
+ bool m_has_case_change; // true if somewhere in the current block the case has changed
100
+ unsigned m_recursion_count; // How many times we've called parse_all.
101
+ #if defined(BOOST_REGEX_MSVC) && defined(_M_IX86)
102
+ // This is an ugly warning suppression workaround (for warnings *inside* std::vector
103
+ // that can not otherwise be suppressed)...
104
+ static_assert(sizeof(long) >= sizeof(void*), "Long isn't long enough!");
105
+ std::vector<long> m_alt_jumps; // list of alternative in the current scope.
106
+ #else
107
+ std::vector<std::ptrdiff_t> m_alt_jumps; // list of alternative in the current scope.
108
+ #endif
109
+
110
+ basic_regex_parser& operator=(const basic_regex_parser&);
111
+ basic_regex_parser(const basic_regex_parser&);
112
+ };
113
+
114
+ template <class charT, class traits>
115
+ basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
116
+ : basic_regex_creator<charT, traits>(data), m_parser_proc(), m_base(0), m_end(0), m_position(0),
117
+ m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0)
118
+ {
119
+ }
120
+
121
+ template <class charT, class traits>
122
+ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, unsigned l_flags)
123
+ {
124
+ // pass l_flags on to base class:
125
+ this->init(l_flags);
126
+ // set up pointers:
127
+ m_position = m_base = p1;
128
+ m_end = p2;
129
+ // empty strings are errors:
130
+ if((p1 == p2) &&
131
+ (
132
+ ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group)
133
+ || (l_flags & regbase::no_empty_expressions)
134
+ )
135
+ )
136
+ {
137
+ fail(regex_constants::error_empty, 0);
138
+ return;
139
+ }
140
+ // select which parser to use:
141
+ switch(l_flags & regbase::main_option_type)
142
+ {
143
+ case regbase::perl_syntax_group:
144
+ {
145
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
146
+ //
147
+ // Add a leading paren with index zero to give recursions a target:
148
+ //
149
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
150
+ br->index = 0;
151
+ br->icase = this->flags() & regbase::icase;
152
+ break;
153
+ }
154
+ case regbase::basic_syntax_group:
155
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
156
+ break;
157
+ case regbase::literal:
158
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_literal;
159
+ break;
160
+ default:
161
+ // Oops, someone has managed to set more than one of the main option flags,
162
+ // so this must be an error:
163
+ fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used.");
164
+ return;
165
+ }
166
+
167
+ // parse all our characters:
168
+ bool result = parse_all();
169
+ //
170
+ // Unwind our alternatives:
171
+ //
172
+ unwind_alts(-1);
173
+ // reset l_flags as a global scope (?imsx) may have altered them:
174
+ this->flags(l_flags);
175
+ // if we haven't gobbled up all the characters then we must
176
+ // have had an unexpected ')' :
177
+ if(!result)
178
+ {
179
+ fail(regex_constants::error_paren, std::distance(m_base, m_position), "Found a closing ) with no corresponding opening parenthesis.");
180
+ return;
181
+ }
182
+ // if an error has been set then give up now:
183
+ if(this->m_pdata->m_status)
184
+ return;
185
+ // fill in our sub-expression count:
186
+ this->m_pdata->m_mark_count = 1u + (std::size_t)m_mark_count;
187
+ this->finalize(p1, p2);
188
+ }
189
+
190
+ template <class charT, class traits>
191
+ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
192
+ {
193
+ // get the error message:
194
+ std::string message = this->m_pdata->m_ptraits->error_string(error_code);
195
+ fail(error_code, position, message);
196
+ }
197
+
198
+ template <class charT, class traits>
199
+ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
200
+ {
201
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
202
+ this->m_pdata->m_status = error_code;
203
+ m_position = m_end; // don't bother parsing anything else
204
+
205
+ //
206
+ // Augment error message with the regular expression text:
207
+ //
208
+ if(start_pos == position)
209
+ start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - static_cast<std::ptrdiff_t>(10));
210
+ std::ptrdiff_t end_pos = (std::min)(position + static_cast<std::ptrdiff_t>(10), static_cast<std::ptrdiff_t>(m_end - m_base));
211
+ if(error_code != regex_constants::error_empty)
212
+ {
213
+ if((start_pos != 0) || (end_pos != (m_end - m_base)))
214
+ message += " The error occurred while parsing the regular expression fragment: '";
215
+ else
216
+ message += " The error occurred while parsing the regular expression: '";
217
+ if(start_pos != end_pos)
218
+ {
219
+ message += std::string(m_base + start_pos, m_base + position);
220
+ message += ">>>HERE>>>";
221
+ message += std::string(m_base + position, m_base + end_pos);
222
+ }
223
+ message += "'.";
224
+ }
225
+
226
+ #ifndef BOOST_NO_EXCEPTIONS
227
+ if(0 == (this->flags() & regex_constants::no_except))
228
+ {
229
+ boost::regex_error e(message, error_code, position);
230
+ e.raise();
231
+ }
232
+ #else
233
+ (void)position; // suppress warnings.
234
+ #endif
235
+ }
236
+
237
+ template <class charT, class traits>
238
+ bool basic_regex_parser<charT, traits>::parse_all()
239
+ {
240
+ if (++m_recursion_count > 400)
241
+ {
242
+ // exceeded internal limits
243
+ fail(boost::regex_constants::error_complexity, m_position - m_base, "Exceeded nested brace limit.");
244
+ }
245
+ bool result = true;
246
+ while(result && (m_position != m_end))
247
+ {
248
+ result = (this->*m_parser_proc)();
249
+ }
250
+ --m_recursion_count;
251
+ return result;
252
+ }
253
+
254
+ #ifdef BOOST_REGEX_MSVC
255
+ #pragma warning(push)
256
+ #pragma warning(disable:4702)
257
+ #endif
258
+ template <class charT, class traits>
259
+ bool basic_regex_parser<charT, traits>::parse_basic()
260
+ {
261
+ switch(this->m_traits.syntax_type(*m_position))
262
+ {
263
+ case regex_constants::syntax_escape:
264
+ return parse_basic_escape();
265
+ case regex_constants::syntax_dot:
266
+ return parse_match_any();
267
+ case regex_constants::syntax_caret:
268
+ ++m_position;
269
+ this->append_state(syntax_element_start_line);
270
+ break;
271
+ case regex_constants::syntax_dollar:
272
+ ++m_position;
273
+ this->append_state(syntax_element_end_line);
274
+ break;
275
+ case regex_constants::syntax_star:
276
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line))
277
+ return parse_literal();
278
+ else
279
+ {
280
+ ++m_position;
281
+ return parse_repeat();
282
+ }
283
+ case regex_constants::syntax_plus:
284
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
285
+ return parse_literal();
286
+ else
287
+ {
288
+ ++m_position;
289
+ return parse_repeat(1);
290
+ }
291
+ case regex_constants::syntax_question:
292
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
293
+ return parse_literal();
294
+ else
295
+ {
296
+ ++m_position;
297
+ return parse_repeat(0, 1);
298
+ }
299
+ case regex_constants::syntax_open_set:
300
+ return parse_set();
301
+ case regex_constants::syntax_newline:
302
+ if(this->flags() & regbase::newline_alt)
303
+ return parse_alt();
304
+ else
305
+ return parse_literal();
306
+ default:
307
+ return parse_literal();
308
+ }
309
+ return true;
310
+ }
311
+
312
+ #ifdef BOOST_REGEX_MSVC
313
+ # pragma warning(push)
314
+ #if BOOST_REGEX_MSVC >= 1800
315
+ #pragma warning(disable:26812)
316
+ #endif
317
+ #endif
318
+ template <class charT, class traits>
319
+ bool basic_regex_parser<charT, traits>::parse_extended()
320
+ {
321
+ bool result = true;
322
+ switch(this->m_traits.syntax_type(*m_position))
323
+ {
324
+ case regex_constants::syntax_open_mark:
325
+ return parse_open_paren();
326
+ case regex_constants::syntax_close_mark:
327
+ return false;
328
+ case regex_constants::syntax_escape:
329
+ return parse_extended_escape();
330
+ case regex_constants::syntax_dot:
331
+ return parse_match_any();
332
+ case regex_constants::syntax_caret:
333
+ ++m_position;
334
+ this->append_state(
335
+ (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line));
336
+ break;
337
+ case regex_constants::syntax_dollar:
338
+ ++m_position;
339
+ this->append_state(
340
+ (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line));
341
+ break;
342
+ case regex_constants::syntax_star:
343
+ if(m_position == this->m_base)
344
+ {
345
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression.");
346
+ return false;
347
+ }
348
+ ++m_position;
349
+ return parse_repeat();
350
+ case regex_constants::syntax_question:
351
+ if(m_position == this->m_base)
352
+ {
353
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression.");
354
+ return false;
355
+ }
356
+ ++m_position;
357
+ return parse_repeat(0,1);
358
+ case regex_constants::syntax_plus:
359
+ if(m_position == this->m_base)
360
+ {
361
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression.");
362
+ return false;
363
+ }
364
+ ++m_position;
365
+ return parse_repeat(1);
366
+ case regex_constants::syntax_open_brace:
367
+ ++m_position;
368
+ return parse_repeat_range(false);
369
+ case regex_constants::syntax_close_brace:
370
+ if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex)
371
+ {
372
+ fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
373
+ return false;
374
+ }
375
+ result = parse_literal();
376
+ break;
377
+ case regex_constants::syntax_or:
378
+ return parse_alt();
379
+ case regex_constants::syntax_open_set:
380
+ return parse_set();
381
+ case regex_constants::syntax_newline:
382
+ if(this->flags() & regbase::newline_alt)
383
+ return parse_alt();
384
+ else
385
+ return parse_literal();
386
+ case regex_constants::syntax_hash:
387
+ //
388
+ // If we have a mod_x flag set, then skip until
389
+ // we get to a newline character:
390
+ //
391
+ if((this->flags()
392
+ & (regbase::no_perl_ex|regbase::mod_x))
393
+ == regbase::mod_x)
394
+ {
395
+ while((m_position != m_end) && !is_separator(*m_position++)){}
396
+ return true;
397
+ }
398
+ BOOST_REGEX_FALLTHROUGH;
399
+ default:
400
+ result = parse_literal();
401
+ break;
402
+ }
403
+ return result;
404
+ }
405
+ #ifdef BOOST_REGEX_MSVC
406
+ # pragma warning(pop)
407
+ #endif
408
+ #ifdef BOOST_REGEX_MSVC
409
+ #pragma warning(pop)
410
+ #endif
411
+
412
+ template <class charT, class traits>
413
+ bool basic_regex_parser<charT, traits>::parse_literal()
414
+ {
415
+ // append this as a literal provided it's not a space character
416
+ // or the perl option regbase::mod_x is not set:
417
+ if(
418
+ ((this->flags()
419
+ & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex))
420
+ != regbase::mod_x)
421
+ || !this->m_traits.isctype(*m_position, this->m_mask_space))
422
+ this->append_literal(*m_position);
423
+ ++m_position;
424
+ return true;
425
+ }
426
+
427
+ template <class charT, class traits>
428
+ bool basic_regex_parser<charT, traits>::parse_open_paren()
429
+ {
430
+ //
431
+ // skip the '(' and error check:
432
+ //
433
+ if(++m_position == m_end)
434
+ {
435
+ fail(regex_constants::error_paren, m_position - m_base);
436
+ return false;
437
+ }
438
+ //
439
+ // begin by checking for a perl-style (?...) extension:
440
+ //
441
+ if(
442
+ ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0)
443
+ || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
444
+ )
445
+ {
446
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
447
+ return parse_perl_extension();
448
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_star)
449
+ return parse_perl_verb();
450
+ }
451
+ //
452
+ // update our mark count, and append the required state:
453
+ //
454
+ unsigned markid = 0;
455
+ if(0 == (this->flags() & regbase::nosubs))
456
+ {
457
+ markid = ++m_mark_count;
458
+ if(this->flags() & regbase::save_subexpression_location)
459
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
460
+ }
461
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
462
+ pb->index = markid;
463
+ pb->icase = this->flags() & regbase::icase;
464
+ std::ptrdiff_t last_paren_start = this->getoffset(pb);
465
+ // back up insertion point for alternations, and set new point:
466
+ std::ptrdiff_t last_alt_point = m_alt_insert_point;
467
+ this->m_pdata->m_data.align();
468
+ m_alt_insert_point = this->m_pdata->m_data.size();
469
+ //
470
+ // back up the current flags in case we have a nested (?imsx) group:
471
+ //
472
+ regex_constants::syntax_option_type opts = this->flags();
473
+ bool old_case_change = m_has_case_change;
474
+ m_has_case_change = false; // no changes to this scope as yet...
475
+ //
476
+ // Back up branch reset data in case we have a nested (?|...)
477
+ //
478
+ int mark_reset = m_mark_reset;
479
+ m_mark_reset = -1;
480
+ //
481
+ // now recursively add more states, this will terminate when we get to a
482
+ // matching ')' :
483
+ //
484
+ parse_all();
485
+ //
486
+ // Unwind pushed alternatives:
487
+ //
488
+ if(0 == unwind_alts(last_paren_start))
489
+ return false;
490
+ //
491
+ // restore flags:
492
+ //
493
+ if(m_has_case_change)
494
+ {
495
+ // the case has changed in one or more of the alternatives
496
+ // within the scoped (...) block: we have to add a state
497
+ // to reset the case sensitivity:
498
+ static_cast<re_case*>(
499
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
500
+ )->icase = opts & regbase::icase;
501
+ }
502
+ this->flags(opts);
503
+ m_has_case_change = old_case_change;
504
+ //
505
+ // restore branch reset:
506
+ //
507
+ m_mark_reset = mark_reset;
508
+ //
509
+ // we either have a ')' or we have run out of characters prematurely:
510
+ //
511
+ if(m_position == m_end)
512
+ {
513
+ this->fail(regex_constants::error_paren, std::distance(m_base, m_end));
514
+ return false;
515
+ }
516
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
517
+ return false;
518
+ if(markid && (this->flags() & regbase::save_subexpression_location))
519
+ this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
520
+ ++m_position;
521
+ //
522
+ // append closing parenthesis state:
523
+ //
524
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
525
+ pb->index = markid;
526
+ pb->icase = this->flags() & regbase::icase;
527
+ this->m_paren_start = last_paren_start;
528
+ //
529
+ // restore the alternate insertion point:
530
+ //
531
+ this->m_alt_insert_point = last_alt_point;
532
+ //
533
+ // allow backrefs to this mark:
534
+ //
535
+ if(markid > 0)
536
+ this->m_backrefs.set(markid);
537
+
538
+ return true;
539
+ }
540
+
541
+ template <class charT, class traits>
542
+ bool basic_regex_parser<charT, traits>::parse_basic_escape()
543
+ {
544
+ if(++m_position == m_end)
545
+ {
546
+ fail(regex_constants::error_paren, m_position - m_base);
547
+ return false;
548
+ }
549
+ bool result = true;
550
+ switch(this->m_traits.escape_syntax_type(*m_position))
551
+ {
552
+ case regex_constants::syntax_open_mark:
553
+ return parse_open_paren();
554
+ case regex_constants::syntax_close_mark:
555
+ return false;
556
+ case regex_constants::syntax_plus:
557
+ if(this->flags() & regex_constants::bk_plus_qm)
558
+ {
559
+ ++m_position;
560
+ return parse_repeat(1);
561
+ }
562
+ else
563
+ return parse_literal();
564
+ case regex_constants::syntax_question:
565
+ if(this->flags() & regex_constants::bk_plus_qm)
566
+ {
567
+ ++m_position;
568
+ return parse_repeat(0, 1);
569
+ }
570
+ else
571
+ return parse_literal();
572
+ case regex_constants::syntax_open_brace:
573
+ if(this->flags() & regbase::no_intervals)
574
+ return parse_literal();
575
+ ++m_position;
576
+ return parse_repeat_range(true);
577
+ case regex_constants::syntax_close_brace:
578
+ if(this->flags() & regbase::no_intervals)
579
+ return parse_literal();
580
+ fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
581
+ return false;
582
+ case regex_constants::syntax_or:
583
+ if(this->flags() & regbase::bk_vbar)
584
+ return parse_alt();
585
+ else
586
+ result = parse_literal();
587
+ break;
588
+ case regex_constants::syntax_digit:
589
+ return parse_backref();
590
+ case regex_constants::escape_type_start_buffer:
591
+ if(this->flags() & regbase::emacs_ex)
592
+ {
593
+ ++m_position;
594
+ this->append_state(syntax_element_buffer_start);
595
+ }
596
+ else
597
+ result = parse_literal();
598
+ break;
599
+ case regex_constants::escape_type_end_buffer:
600
+ if(this->flags() & regbase::emacs_ex)
601
+ {
602
+ ++m_position;
603
+ this->append_state(syntax_element_buffer_end);
604
+ }
605
+ else
606
+ result = parse_literal();
607
+ break;
608
+ case regex_constants::escape_type_word_assert:
609
+ if(this->flags() & regbase::emacs_ex)
610
+ {
611
+ ++m_position;
612
+ this->append_state(syntax_element_word_boundary);
613
+ }
614
+ else
615
+ result = parse_literal();
616
+ break;
617
+ case regex_constants::escape_type_not_word_assert:
618
+ if(this->flags() & regbase::emacs_ex)
619
+ {
620
+ ++m_position;
621
+ this->append_state(syntax_element_within_word);
622
+ }
623
+ else
624
+ result = parse_literal();
625
+ break;
626
+ case regex_constants::escape_type_left_word:
627
+ if(this->flags() & regbase::emacs_ex)
628
+ {
629
+ ++m_position;
630
+ this->append_state(syntax_element_word_start);
631
+ }
632
+ else
633
+ result = parse_literal();
634
+ break;
635
+ case regex_constants::escape_type_right_word:
636
+ if(this->flags() & regbase::emacs_ex)
637
+ {
638
+ ++m_position;
639
+ this->append_state(syntax_element_word_end);
640
+ }
641
+ else
642
+ result = parse_literal();
643
+ break;
644
+ default:
645
+ if(this->flags() & regbase::emacs_ex)
646
+ {
647
+ bool negate = true;
648
+ switch(*m_position)
649
+ {
650
+ case 'w':
651
+ negate = false;
652
+ BOOST_REGEX_FALLTHROUGH;
653
+ case 'W':
654
+ {
655
+ basic_char_set<charT, traits> char_set;
656
+ if(negate)
657
+ char_set.negate();
658
+ char_set.add_class(this->m_word_mask);
659
+ if(0 == this->append_set(char_set))
660
+ {
661
+ fail(regex_constants::error_ctype, m_position - m_base);
662
+ return false;
663
+ }
664
+ ++m_position;
665
+ return true;
666
+ }
667
+ case 's':
668
+ negate = false;
669
+ BOOST_REGEX_FALLTHROUGH;
670
+ case 'S':
671
+ return add_emacs_code(negate);
672
+ case 'c':
673
+ case 'C':
674
+ // not supported yet:
675
+ fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead.");
676
+ return false;
677
+ default:
678
+ break;
679
+ }
680
+ }
681
+ result = parse_literal();
682
+ break;
683
+ }
684
+ return result;
685
+ }
686
+
687
+ template <class charT, class traits>
688
+ bool basic_regex_parser<charT, traits>::parse_extended_escape()
689
+ {
690
+ ++m_position;
691
+ if(m_position == m_end)
692
+ {
693
+ fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found.");
694
+ return false;
695
+ }
696
+ bool negate = false; // in case this is a character class escape: \w \d etc
697
+ switch(this->m_traits.escape_syntax_type(*m_position))
698
+ {
699
+ case regex_constants::escape_type_not_class:
700
+ negate = true;
701
+ BOOST_REGEX_FALLTHROUGH;
702
+ case regex_constants::escape_type_class:
703
+ {
704
+ escape_type_class_jump:
705
+ typedef typename traits::char_class_type m_type;
706
+ m_type m = this->m_traits.lookup_classname(m_position, m_position+1);
707
+ if(m != 0)
708
+ {
709
+ basic_char_set<charT, traits> char_set;
710
+ if(negate)
711
+ char_set.negate();
712
+ char_set.add_class(m);
713
+ if(0 == this->append_set(char_set))
714
+ {
715
+ fail(regex_constants::error_ctype, m_position - m_base);
716
+ return false;
717
+ }
718
+ ++m_position;
719
+ return true;
720
+ }
721
+ //
722
+ // not a class, just a regular unknown escape:
723
+ //
724
+ this->append_literal(unescape_character());
725
+ break;
726
+ }
727
+ case regex_constants::syntax_digit:
728
+ return parse_backref();
729
+ case regex_constants::escape_type_left_word:
730
+ ++m_position;
731
+ this->append_state(syntax_element_word_start);
732
+ break;
733
+ case regex_constants::escape_type_right_word:
734
+ ++m_position;
735
+ this->append_state(syntax_element_word_end);
736
+ break;
737
+ case regex_constants::escape_type_start_buffer:
738
+ ++m_position;
739
+ this->append_state(syntax_element_buffer_start);
740
+ break;
741
+ case regex_constants::escape_type_end_buffer:
742
+ ++m_position;
743
+ this->append_state(syntax_element_buffer_end);
744
+ break;
745
+ case regex_constants::escape_type_word_assert:
746
+ ++m_position;
747
+ this->append_state(syntax_element_word_boundary);
748
+ break;
749
+ case regex_constants::escape_type_not_word_assert:
750
+ ++m_position;
751
+ this->append_state(syntax_element_within_word);
752
+ break;
753
+ case regex_constants::escape_type_Z:
754
+ ++m_position;
755
+ this->append_state(syntax_element_soft_buffer_end);
756
+ break;
757
+ case regex_constants::escape_type_Q:
758
+ return parse_QE();
759
+ case regex_constants::escape_type_C:
760
+ return parse_match_any();
761
+ case regex_constants::escape_type_X:
762
+ ++m_position;
763
+ this->append_state(syntax_element_combining);
764
+ break;
765
+ case regex_constants::escape_type_G:
766
+ ++m_position;
767
+ this->append_state(syntax_element_restart_continue);
768
+ break;
769
+ case regex_constants::escape_type_not_property:
770
+ negate = true;
771
+ BOOST_REGEX_FALLTHROUGH;
772
+ case regex_constants::escape_type_property:
773
+ {
774
+ ++m_position;
775
+ char_class_type m;
776
+ if(m_position == m_end)
777
+ {
778
+ fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found.");
779
+ return false;
780
+ }
781
+ // maybe have \p{ddd}
782
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
783
+ {
784
+ const charT* base = m_position;
785
+ // skip forward until we find enclosing brace:
786
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
787
+ ++m_position;
788
+ if(m_position == m_end)
789
+ {
790
+ fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence.");
791
+ return false;
792
+ }
793
+ m = this->m_traits.lookup_classname(++base, m_position++);
794
+ }
795
+ else
796
+ {
797
+ m = this->m_traits.lookup_classname(m_position, m_position+1);
798
+ ++m_position;
799
+ }
800
+ if(m != 0)
801
+ {
802
+ basic_char_set<charT, traits> char_set;
803
+ if(negate)
804
+ char_set.negate();
805
+ char_set.add_class(m);
806
+ if(0 == this->append_set(char_set))
807
+ {
808
+ fail(regex_constants::error_ctype, m_position - m_base);
809
+ return false;
810
+ }
811
+ return true;
812
+ }
813
+ fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name.");
814
+ return false;
815
+ }
816
+ case regex_constants::escape_type_reset_start_mark:
817
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
818
+ {
819
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
820
+ pb->index = -5;
821
+ pb->icase = this->flags() & regbase::icase;
822
+ this->m_pdata->m_data.align();
823
+ ++m_position;
824
+ return true;
825
+ }
826
+ goto escape_type_class_jump;
827
+ case regex_constants::escape_type_line_ending:
828
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
829
+ {
830
+ const charT* e = get_escape_R_string<charT>();
831
+ const charT* old_position = m_position;
832
+ const charT* old_end = m_end;
833
+ const charT* old_base = m_base;
834
+ m_position = e;
835
+ m_base = e;
836
+ m_end = e + traits::length(e);
837
+ bool r = parse_all();
838
+ m_position = ++old_position;
839
+ m_end = old_end;
840
+ m_base = old_base;
841
+ return r;
842
+ }
843
+ goto escape_type_class_jump;
844
+ case regex_constants::escape_type_extended_backref:
845
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
846
+ {
847
+ bool have_brace = false;
848
+ bool negative = false;
849
+ static const char incomplete_message[] = "Incomplete \\g escape found.";
850
+ if(++m_position == m_end)
851
+ {
852
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
853
+ return false;
854
+ }
855
+ // maybe have \g{ddd}
856
+ regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position);
857
+ regex_constants::syntax_type syn_end = 0;
858
+ if((syn == regex_constants::syntax_open_brace)
859
+ || (syn == regex_constants::escape_type_left_word)
860
+ || (syn == regex_constants::escape_type_end_buffer))
861
+ {
862
+ if(++m_position == m_end)
863
+ {
864
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
865
+ return false;
866
+ }
867
+ have_brace = true;
868
+ switch(syn)
869
+ {
870
+ case regex_constants::syntax_open_brace:
871
+ syn_end = regex_constants::syntax_close_brace;
872
+ break;
873
+ case regex_constants::escape_type_left_word:
874
+ syn_end = regex_constants::escape_type_right_word;
875
+ break;
876
+ default:
877
+ syn_end = regex_constants::escape_type_end_buffer;
878
+ break;
879
+ }
880
+ }
881
+ negative = (*m_position == static_cast<charT>('-'));
882
+ if((negative) && (++m_position == m_end))
883
+ {
884
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
885
+ return false;
886
+ }
887
+ const charT* pc = m_position;
888
+ std::intmax_t i = this->m_traits.toi(pc, m_end, 10);
889
+ if((i < 0) && syn_end)
890
+ {
891
+ // Check for a named capture, get the leftmost one if there is more than one:
892
+ const charT* base = m_position;
893
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end))
894
+ {
895
+ ++m_position;
896
+ }
897
+ i = hash_value_from_capture_name(base, m_position);
898
+ pc = m_position;
899
+ }
900
+ if(negative)
901
+ i = 1 + (static_cast<std::intmax_t>(m_mark_count) - i);
902
+ if(((i < hash_value_mask) && (i > 0) && (this->m_backrefs.test((std::size_t)i))) || ((i >= hash_value_mask) && (this->m_pdata->get_id((int)i) > 0) && (this->m_backrefs.test(this->m_pdata->get_id((int)i)))))
903
+ {
904
+ m_position = pc;
905
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
906
+ pb->index = (int)i;
907
+ pb->icase = this->flags() & regbase::icase;
908
+ }
909
+ else
910
+ {
911
+ fail(regex_constants::error_backref, m_position - m_base);
912
+ return false;
913
+ }
914
+ m_position = pc;
915
+ if(have_brace)
916
+ {
917
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end))
918
+ {
919
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
920
+ return false;
921
+ }
922
+ ++m_position;
923
+ }
924
+ return true;
925
+ }
926
+ goto escape_type_class_jump;
927
+ case regex_constants::escape_type_control_v:
928
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
929
+ goto escape_type_class_jump;
930
+ BOOST_REGEX_FALLTHROUGH;
931
+ default:
932
+ this->append_literal(unescape_character());
933
+ break;
934
+ }
935
+ return true;
936
+ }
937
+
938
+ template <class charT, class traits>
939
+ bool basic_regex_parser<charT, traits>::parse_match_any()
940
+ {
941
+ //
942
+ // we have a '.' that can match any character:
943
+ //
944
+ ++m_position;
945
+ static_cast<re_dot*>(
946
+ this->append_state(syntax_element_wild, sizeof(re_dot))
947
+ )->mask = static_cast<unsigned char>(this->flags() & regbase::no_mod_s
948
+ ? BOOST_REGEX_DETAIL_NS::force_not_newline
949
+ : this->flags() & regbase::mod_s ?
950
+ BOOST_REGEX_DETAIL_NS::force_newline : BOOST_REGEX_DETAIL_NS::dont_care);
951
+ return true;
952
+ }
953
+
954
+ template <class charT, class traits>
955
+ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
956
+ {
957
+ bool greedy = true;
958
+ bool possessive = false;
959
+ std::size_t insert_point;
960
+ //
961
+ // when we get to here we may have a non-greedy ? mark still to come:
962
+ //
963
+ if((m_position != m_end)
964
+ && (
965
+ (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
966
+ || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex)))
967
+ )
968
+ )
969
+ {
970
+ // OK we have a perl or emacs regex, check for a '?':
971
+ if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
972
+ {
973
+ // whitespace skip:
974
+ while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
975
+ ++m_position;
976
+ }
977
+ if((m_position != m_end) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question))
978
+ {
979
+ greedy = false;
980
+ ++m_position;
981
+ }
982
+ // for perl regexes only check for possessive ++ repeats.
983
+ if((m_position != m_end)
984
+ && (0 == (this->flags() & regbase::main_option_type))
985
+ && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
986
+ {
987
+ possessive = true;
988
+ ++m_position;
989
+ }
990
+ }
991
+ if(0 == this->m_last_state)
992
+ {
993
+ fail(regex_constants::error_badrepeat, std::distance(m_base, m_position), "Nothing to repeat.");
994
+ return false;
995
+ }
996
+ if(this->m_last_state->type == syntax_element_endmark)
997
+ {
998
+ // insert a repeat before the '(' matching the last ')':
999
+ insert_point = this->m_paren_start;
1000
+ }
1001
+ else if((this->m_last_state->type == syntax_element_literal) && (static_cast<re_literal*>(this->m_last_state)->length > 1))
1002
+ {
1003
+ // the last state was a literal with more than one character, split it in two:
1004
+ re_literal* lit = static_cast<re_literal*>(this->m_last_state);
1005
+ charT c = (static_cast<charT*>(static_cast<void*>(lit+1)))[lit->length - 1];
1006
+ lit->length -= 1;
1007
+ // now append new state:
1008
+ lit = static_cast<re_literal*>(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
1009
+ lit->length = 1;
1010
+ (static_cast<charT*>(static_cast<void*>(lit+1)))[0] = c;
1011
+ insert_point = this->getoffset(this->m_last_state);
1012
+ }
1013
+ else
1014
+ {
1015
+ // repeat the last state whatever it was, need to add some error checking here:
1016
+ switch(this->m_last_state->type)
1017
+ {
1018
+ case syntax_element_start_line:
1019
+ case syntax_element_end_line:
1020
+ case syntax_element_word_boundary:
1021
+ case syntax_element_within_word:
1022
+ case syntax_element_word_start:
1023
+ case syntax_element_word_end:
1024
+ case syntax_element_buffer_start:
1025
+ case syntax_element_buffer_end:
1026
+ case syntax_element_alt:
1027
+ case syntax_element_soft_buffer_end:
1028
+ case syntax_element_restart_continue:
1029
+ case syntax_element_jump:
1030
+ case syntax_element_startmark:
1031
+ case syntax_element_backstep:
1032
+ // can't legally repeat any of the above:
1033
+ fail(regex_constants::error_badrepeat, m_position - m_base);
1034
+ return false;
1035
+ default:
1036
+ // do nothing...
1037
+ break;
1038
+ }
1039
+ insert_point = this->getoffset(this->m_last_state);
1040
+ }
1041
+ //
1042
+ // OK we now know what to repeat, so insert the repeat around it:
1043
+ //
1044
+ re_repeat* rep = static_cast<re_repeat*>(this->insert_state(insert_point, syntax_element_rep, re_repeater_size));
1045
+ rep->min = low;
1046
+ rep->max = high;
1047
+ rep->greedy = greedy;
1048
+ rep->leading = false;
1049
+ // store our repeater position for later:
1050
+ std::ptrdiff_t rep_off = this->getoffset(rep);
1051
+ // and append a back jump to the repeat:
1052
+ re_jump* jmp = static_cast<re_jump*>(this->append_state(syntax_element_jump, sizeof(re_jump)));
1053
+ jmp->alt.i = rep_off - this->getoffset(jmp);
1054
+ this->m_pdata->m_data.align();
1055
+ // now fill in the alt jump for the repeat:
1056
+ rep = static_cast<re_repeat*>(this->getaddress(rep_off));
1057
+ rep->alt.i = this->m_pdata->m_data.size() - rep_off;
1058
+ //
1059
+ // If the repeat is possessive then bracket the repeat with a (?>...)
1060
+ // independent sub-expression construct:
1061
+ //
1062
+ if(possessive)
1063
+ {
1064
+ if(m_position != m_end)
1065
+ {
1066
+ //
1067
+ // Check for illegal following quantifier, we have to do this here, because
1068
+ // the extra states we insert below circumvents our usual error checking :-(
1069
+ //
1070
+ bool contin = false;
1071
+ do
1072
+ {
1073
+ if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
1074
+ {
1075
+ // whitespace skip:
1076
+ while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
1077
+ ++m_position;
1078
+ }
1079
+ if (m_position != m_end)
1080
+ {
1081
+ switch (this->m_traits.syntax_type(*m_position))
1082
+ {
1083
+ case regex_constants::syntax_star:
1084
+ case regex_constants::syntax_plus:
1085
+ case regex_constants::syntax_question:
1086
+ case regex_constants::syntax_open_brace:
1087
+ fail(regex_constants::error_badrepeat, m_position - m_base);
1088
+ return false;
1089
+ case regex_constants::syntax_open_mark:
1090
+ // Do we have a comment? If so we need to skip it here...
1091
+ if ((m_position + 2 < m_end) && this->m_traits.syntax_type(*(m_position + 1)) == regex_constants::syntax_question
1092
+ && this->m_traits.syntax_type(*(m_position + 2)) == regex_constants::syntax_hash)
1093
+ {
1094
+ while ((m_position != m_end)
1095
+ && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) {
1096
+ }
1097
+ contin = true;
1098
+ }
1099
+ else
1100
+ contin = false;
1101
+ }
1102
+ }
1103
+ else
1104
+ contin = false;
1105
+ } while (contin);
1106
+ }
1107
+ re_brace* pb = static_cast<re_brace*>(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
1108
+ pb->index = -3;
1109
+ pb->icase = this->flags() & regbase::icase;
1110
+ jmp = static_cast<re_jump*>(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump)));
1111
+ this->m_pdata->m_data.align();
1112
+ jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
1113
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
1114
+ pb->index = -3;
1115
+ pb->icase = this->flags() & regbase::icase;
1116
+ }
1117
+ return true;
1118
+ }
1119
+
1120
+ template <class charT, class traits>
1121
+ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
1122
+ {
1123
+ static const char incomplete_message[] = "Missing } in quantified repetition.";
1124
+ //
1125
+ // parse a repeat-range:
1126
+ //
1127
+ std::size_t min, max;
1128
+ std::intmax_t v;
1129
+ // skip whitespace:
1130
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
1131
+ ++m_position;
1132
+ if(this->m_position == this->m_end)
1133
+ {
1134
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
1135
+ {
1136
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1137
+ return false;
1138
+ }
1139
+ // Treat the opening '{' as a literal character, rewind to start of error:
1140
+ --m_position;
1141
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1142
+ return parse_literal();
1143
+ }
1144
+ // get min:
1145
+ v = this->m_traits.toi(m_position, m_end, 10);
1146
+ // skip whitespace:
1147
+ if((v < 0) || (v > umax()))
1148
+ {
1149
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
1150
+ {
1151
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1152
+ return false;
1153
+ }
1154
+ // Treat the opening '{' as a literal character, rewind to start of error:
1155
+ --m_position;
1156
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1157
+ return parse_literal();
1158
+ }
1159
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
1160
+ ++m_position;
1161
+ if(this->m_position == this->m_end)
1162
+ {
1163
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
1164
+ {
1165
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1166
+ return false;
1167
+ }
1168
+ // Treat the opening '{' as a literal character, rewind to start of error:
1169
+ --m_position;
1170
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1171
+ return parse_literal();
1172
+ }
1173
+ min = static_cast<std::size_t>(v);
1174
+ // see if we have a comma:
1175
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma)
1176
+ {
1177
+ // move on and error check:
1178
+ ++m_position;
1179
+ // skip whitespace:
1180
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
1181
+ ++m_position;
1182
+ if(this->m_position == this->m_end)
1183
+ {
1184
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
1185
+ {
1186
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1187
+ return false;
1188
+ }
1189
+ // Treat the opening '{' as a literal character, rewind to start of error:
1190
+ --m_position;
1191
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1192
+ return parse_literal();
1193
+ }
1194
+ // get the value if any:
1195
+ v = this->m_traits.toi(m_position, m_end, 10);
1196
+ max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
1197
+ }
1198
+ else
1199
+ {
1200
+ // no comma, max = min:
1201
+ max = min;
1202
+ }
1203
+ // skip whitespace:
1204
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
1205
+ ++m_position;
1206
+ // OK now check trailing }:
1207
+ if(this->m_position == this->m_end)
1208
+ {
1209
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
1210
+ {
1211
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1212
+ return false;
1213
+ }
1214
+ // Treat the opening '{' as a literal character, rewind to start of error:
1215
+ --m_position;
1216
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1217
+ return parse_literal();
1218
+ }
1219
+ if(isbasic)
1220
+ {
1221
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape)
1222
+ {
1223
+ ++m_position;
1224
+ if(this->m_position == this->m_end)
1225
+ {
1226
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1227
+ return false;
1228
+ }
1229
+ }
1230
+ else
1231
+ {
1232
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
1233
+ return false;
1234
+ }
1235
+ }
1236
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace)
1237
+ ++m_position;
1238
+ else
1239
+ {
1240
+ // Treat the opening '{' as a literal character, rewind to start of error:
1241
+ --m_position;
1242
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
1243
+ return parse_literal();
1244
+ }
1245
+ //
1246
+ // finally go and add the repeat, unless error:
1247
+ //
1248
+ if(min > max)
1249
+ {
1250
+ // Backtrack to error location:
1251
+ m_position -= 2;
1252
+ while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position;
1253
+ ++m_position;
1254
+ fail(regex_constants::error_badbrace, m_position - m_base);
1255
+ return false;
1256
+ }
1257
+ return parse_repeat(min, max);
1258
+ }
1259
+
1260
+ template <class charT, class traits>
1261
+ bool basic_regex_parser<charT, traits>::parse_alt()
1262
+ {
1263
+ //
1264
+ // error check: if there have been no previous states,
1265
+ // or if the last state was a '(' then error:
1266
+ //
1267
+ if(
1268
+ ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark))
1269
+ &&
1270
+ !(
1271
+ ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
1272
+ &&
1273
+ ((this->flags() & regbase::no_empty_expressions) == 0)
1274
+ )
1275
+ )
1276
+ {
1277
+ fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |.");
1278
+ return false;
1279
+ }
1280
+ //
1281
+ // Reset mark count if required:
1282
+ //
1283
+ if(m_max_mark < m_mark_count)
1284
+ m_max_mark = m_mark_count;
1285
+ if(m_mark_reset >= 0)
1286
+ m_mark_count = m_mark_reset;
1287
+
1288
+ ++m_position;
1289
+ //
1290
+ // we need to append a trailing jump:
1291
+ //
1292
+ re_syntax_base* pj = this->append_state(BOOST_REGEX_DETAIL_NS::syntax_element_jump, sizeof(re_jump));
1293
+ std::ptrdiff_t jump_offset = this->getoffset(pj);
1294
+ //
1295
+ // now insert the alternative:
1296
+ //
1297
+ re_alt* palt = static_cast<re_alt*>(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size));
1298
+ jump_offset += re_alt_size;
1299
+ this->m_pdata->m_data.align();
1300
+ palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt);
1301
+ //
1302
+ // update m_alt_insert_point so that the next alternate gets
1303
+ // inserted at the start of the second of the two we've just created:
1304
+ //
1305
+ this->m_alt_insert_point = this->m_pdata->m_data.size();
1306
+ //
1307
+ // the start of this alternative must have a case changes state
1308
+ // if the current block has messed around with case changes:
1309
+ //
1310
+ if(m_has_case_change)
1311
+ {
1312
+ static_cast<re_case*>(
1313
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
1314
+ )->icase = this->m_icase;
1315
+ }
1316
+ //
1317
+ // push the alternative onto our stack, a recursive
1318
+ // implementation here is easier to understand (and faster
1319
+ // as it happens), but causes all kinds of stack overflow problems
1320
+ // on programs with small stacks (COM+).
1321
+ //
1322
+ m_alt_jumps.push_back(jump_offset);
1323
+ return true;
1324
+ }
1325
+
1326
+ template <class charT, class traits>
1327
+ bool basic_regex_parser<charT, traits>::parse_set()
1328
+ {
1329
+ static const char incomplete_message[] = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
1330
+ ++m_position;
1331
+ if(m_position == m_end)
1332
+ {
1333
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1334
+ return false;
1335
+ }
1336
+ basic_char_set<charT, traits> char_set;
1337
+
1338
+ const charT* base = m_position; // where the '[' was
1339
+ const charT* item_base = m_position; // where the '[' or '^' was
1340
+
1341
+ while(m_position != m_end)
1342
+ {
1343
+ switch(this->m_traits.syntax_type(*m_position))
1344
+ {
1345
+ case regex_constants::syntax_caret:
1346
+ if(m_position == base)
1347
+ {
1348
+ char_set.negate();
1349
+ ++m_position;
1350
+ item_base = m_position;
1351
+ }
1352
+ else
1353
+ parse_set_literal(char_set);
1354
+ break;
1355
+ case regex_constants::syntax_close_set:
1356
+ if(m_position == item_base)
1357
+ {
1358
+ parse_set_literal(char_set);
1359
+ break;
1360
+ }
1361
+ else
1362
+ {
1363
+ ++m_position;
1364
+ if(0 == this->append_set(char_set))
1365
+ {
1366
+ fail(regex_constants::error_ctype, m_position - m_base);
1367
+ return false;
1368
+ }
1369
+ }
1370
+ return true;
1371
+ case regex_constants::syntax_open_set:
1372
+ if(parse_inner_set(char_set))
1373
+ break;
1374
+ return true;
1375
+ case regex_constants::syntax_escape:
1376
+ {
1377
+ //
1378
+ // look ahead and see if this is a character class shortcut
1379
+ // \d \w \s etc...
1380
+ //
1381
+ ++m_position;
1382
+ if(this->m_traits.escape_syntax_type(*m_position)
1383
+ == regex_constants::escape_type_class)
1384
+ {
1385
+ char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
1386
+ if(m != 0)
1387
+ {
1388
+ char_set.add_class(m);
1389
+ ++m_position;
1390
+ break;
1391
+ }
1392
+ }
1393
+ else if(this->m_traits.escape_syntax_type(*m_position)
1394
+ == regex_constants::escape_type_not_class)
1395
+ {
1396
+ // negated character class:
1397
+ char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
1398
+ if(m != 0)
1399
+ {
1400
+ char_set.add_negated_class(m);
1401
+ ++m_position;
1402
+ break;
1403
+ }
1404
+ }
1405
+ // not a character class, just a regular escape:
1406
+ --m_position;
1407
+ parse_set_literal(char_set);
1408
+ break;
1409
+ }
1410
+ default:
1411
+ parse_set_literal(char_set);
1412
+ break;
1413
+ }
1414
+ }
1415
+ return m_position != m_end;
1416
+ }
1417
+
1418
+ template <class charT, class traits>
1419
+ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
1420
+ {
1421
+ static const char incomplete_message[] = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
1422
+ //
1423
+ // we have either a character class [:name:]
1424
+ // a collating element [.name.]
1425
+ // or an equivalence class [=name=]
1426
+ //
1427
+ if(m_end == ++m_position)
1428
+ {
1429
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1430
+ return false;
1431
+ }
1432
+ switch(this->m_traits.syntax_type(*m_position))
1433
+ {
1434
+ case regex_constants::syntax_dot:
1435
+ //
1436
+ // a collating element is treated as a literal:
1437
+ //
1438
+ --m_position;
1439
+ parse_set_literal(char_set);
1440
+ return true;
1441
+ case regex_constants::syntax_colon:
1442
+ {
1443
+ // check that character classes are actually enabled:
1444
+ if((this->flags() & (regbase::main_option_type | regbase::no_char_classes))
1445
+ == (regbase::basic_syntax_group | regbase::no_char_classes))
1446
+ {
1447
+ --m_position;
1448
+ parse_set_literal(char_set);
1449
+ return true;
1450
+ }
1451
+ // skip the ':'
1452
+ if(m_end == ++m_position)
1453
+ {
1454
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1455
+ return false;
1456
+ }
1457
+ const charT* name_first = m_position;
1458
+ // skip at least one character, then find the matching ':]'
1459
+ if(m_end == ++m_position)
1460
+ {
1461
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1462
+ return false;
1463
+ }
1464
+ while((m_position != m_end)
1465
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon))
1466
+ ++m_position;
1467
+ const charT* name_last = m_position;
1468
+ if(m_end == m_position)
1469
+ {
1470
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1471
+ return false;
1472
+ }
1473
+ if((m_end == ++m_position)
1474
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
1475
+ {
1476
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1477
+ return false;
1478
+ }
1479
+ //
1480
+ // check for negated class:
1481
+ //
1482
+ bool negated = false;
1483
+ if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret)
1484
+ {
1485
+ ++name_first;
1486
+ negated = true;
1487
+ }
1488
+ typedef typename traits::char_class_type m_type;
1489
+ m_type m = this->m_traits.lookup_classname(name_first, name_last);
1490
+ if(m == 0)
1491
+ {
1492
+ if(char_set.empty() && (name_last - name_first == 1))
1493
+ {
1494
+ // maybe a special case:
1495
+ ++m_position;
1496
+ if( (m_position != m_end)
1497
+ && (this->m_traits.syntax_type(*m_position)
1498
+ == regex_constants::syntax_close_set))
1499
+ {
1500
+ if(this->m_traits.escape_syntax_type(*name_first)
1501
+ == regex_constants::escape_type_left_word)
1502
+ {
1503
+ ++m_position;
1504
+ this->append_state(syntax_element_word_start);
1505
+ return false;
1506
+ }
1507
+ if(this->m_traits.escape_syntax_type(*name_first)
1508
+ == regex_constants::escape_type_right_word)
1509
+ {
1510
+ ++m_position;
1511
+ this->append_state(syntax_element_word_end);
1512
+ return false;
1513
+ }
1514
+ }
1515
+ }
1516
+ fail(regex_constants::error_ctype, name_first - m_base);
1517
+ return false;
1518
+ }
1519
+ if(!negated)
1520
+ char_set.add_class(m);
1521
+ else
1522
+ char_set.add_negated_class(m);
1523
+ ++m_position;
1524
+ break;
1525
+ }
1526
+ case regex_constants::syntax_equal:
1527
+ {
1528
+ // skip the '='
1529
+ if(m_end == ++m_position)
1530
+ {
1531
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1532
+ return false;
1533
+ }
1534
+ const charT* name_first = m_position;
1535
+ // skip at least one character, then find the matching '=]'
1536
+ if(m_end == ++m_position)
1537
+ {
1538
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1539
+ return false;
1540
+ }
1541
+ while((m_position != m_end)
1542
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal))
1543
+ ++m_position;
1544
+ const charT* name_last = m_position;
1545
+ if(m_end == m_position)
1546
+ {
1547
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1548
+ return false;
1549
+ }
1550
+ if((m_end == ++m_position)
1551
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
1552
+ {
1553
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
1554
+ return false;
1555
+ }
1556
+ string_type m = this->m_traits.lookup_collatename(name_first, name_last);
1557
+ if(m.empty() || (m.size() > 2))
1558
+ {
1559
+ fail(regex_constants::error_collate, name_first - m_base);
1560
+ return false;
1561
+ }
1562
+ digraph<charT> d;
1563
+ d.first = m[0];
1564
+ if(m.size() > 1)
1565
+ d.second = m[1];
1566
+ else
1567
+ d.second = 0;
1568
+ char_set.add_equivalent(d);
1569
+ ++m_position;
1570
+ break;
1571
+ }
1572
+ default:
1573
+ --m_position;
1574
+ parse_set_literal(char_set);
1575
+ break;
1576
+ }
1577
+ return true;
1578
+ }
1579
+
1580
+ template <class charT, class traits>
1581
+ void basic_regex_parser<charT, traits>::parse_set_literal(basic_char_set<charT, traits>& char_set)
1582
+ {
1583
+ digraph<charT> start_range(get_next_set_literal(char_set));
1584
+ if(m_end == m_position)
1585
+ {
1586
+ fail(regex_constants::error_brack, m_position - m_base);
1587
+ return;
1588
+ }
1589
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
1590
+ {
1591
+ // we have a range:
1592
+ if(m_end == ++m_position)
1593
+ {
1594
+ fail(regex_constants::error_brack, m_position - m_base);
1595
+ return;
1596
+ }
1597
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)
1598
+ {
1599
+ digraph<charT> end_range = get_next_set_literal(char_set);
1600
+ char_set.add_range(start_range, end_range);
1601
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
1602
+ {
1603
+ if(m_end == ++m_position)
1604
+ {
1605
+ fail(regex_constants::error_brack, m_position - m_base);
1606
+ return;
1607
+ }
1608
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)
1609
+ {
1610
+ // trailing - :
1611
+ --m_position;
1612
+ return;
1613
+ }
1614
+ fail(regex_constants::error_range, m_position - m_base);
1615
+ return;
1616
+ }
1617
+ return;
1618
+ }
1619
+ --m_position;
1620
+ }
1621
+ char_set.add_single(start_range);
1622
+ }
1623
+
1624
+ template <class charT, class traits>
1625
+ digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
1626
+ {
1627
+ digraph<charT> result;
1628
+ switch(this->m_traits.syntax_type(*m_position))
1629
+ {
1630
+ case regex_constants::syntax_dash:
1631
+ if(!char_set.empty())
1632
+ {
1633
+ // see if we are at the end of the set:
1634
+ if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
1635
+ {
1636
+ fail(regex_constants::error_range, m_position - m_base);
1637
+ return result;
1638
+ }
1639
+ --m_position;
1640
+ }
1641
+ result.first = *m_position++;
1642
+ return result;
1643
+ case regex_constants::syntax_escape:
1644
+ // check to see if escapes are supported first:
1645
+ if(this->flags() & regex_constants::no_escape_in_lists)
1646
+ {
1647
+ result = *m_position++;
1648
+ break;
1649
+ }
1650
+ ++m_position;
1651
+ result = unescape_character();
1652
+ break;
1653
+ case regex_constants::syntax_open_set:
1654
+ {
1655
+ if(m_end == ++m_position)
1656
+ {
1657
+ fail(regex_constants::error_collate, m_position - m_base);
1658
+ return result;
1659
+ }
1660
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)
1661
+ {
1662
+ --m_position;
1663
+ result.first = *m_position;
1664
+ ++m_position;
1665
+ return result;
1666
+ }
1667
+ if(m_end == ++m_position)
1668
+ {
1669
+ fail(regex_constants::error_collate, m_position - m_base);
1670
+ return result;
1671
+ }
1672
+ const charT* name_first = m_position;
1673
+ // skip at least one character, then find the matching ':]'
1674
+ if(m_end == ++m_position)
1675
+ {
1676
+ fail(regex_constants::error_collate, name_first - m_base);
1677
+ return result;
1678
+ }
1679
+ while((m_position != m_end)
1680
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot))
1681
+ ++m_position;
1682
+ const charT* name_last = m_position;
1683
+ if(m_end == m_position)
1684
+ {
1685
+ fail(regex_constants::error_collate, name_first - m_base);
1686
+ return result;
1687
+ }
1688
+ if((m_end == ++m_position)
1689
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
1690
+ {
1691
+ fail(regex_constants::error_collate, name_first - m_base);
1692
+ return result;
1693
+ }
1694
+ ++m_position;
1695
+ string_type s = this->m_traits.lookup_collatename(name_first, name_last);
1696
+ if(s.empty() || (s.size() > 2))
1697
+ {
1698
+ fail(regex_constants::error_collate, name_first - m_base);
1699
+ return result;
1700
+ }
1701
+ result.first = s[0];
1702
+ if(s.size() > 1)
1703
+ result.second = s[1];
1704
+ else
1705
+ result.second = 0;
1706
+ return result;
1707
+ }
1708
+ default:
1709
+ result = *m_position++;
1710
+ }
1711
+ return result;
1712
+ }
1713
+
1714
+ //
1715
+ // does a value fit in the specified charT type?
1716
+ //
1717
+ template <class charT>
1718
+ bool valid_value(charT, std::intmax_t v, const std::integral_constant<bool, true>&)
1719
+ {
1720
+ return (v >> (sizeof(charT) * CHAR_BIT)) == 0;
1721
+ }
1722
+ template <class charT>
1723
+ bool valid_value(charT, std::intmax_t, const std::integral_constant<bool, false>&)
1724
+ {
1725
+ return true; // v will alsways fit in a charT
1726
+ }
1727
+ template <class charT>
1728
+ bool valid_value(charT c, std::intmax_t v)
1729
+ {
1730
+ return valid_value(c, v, std::integral_constant<bool, (sizeof(charT) < sizeof(std::intmax_t))>());
1731
+ }
1732
+
1733
+ template <class charT, class traits>
1734
+ charT basic_regex_parser<charT, traits>::unescape_character()
1735
+ {
1736
+ #ifdef BOOST_REGEX_MSVC
1737
+ #pragma warning(push)
1738
+ #pragma warning(disable:4127)
1739
+ #endif
1740
+ charT result(0);
1741
+ if(m_position == m_end)
1742
+ {
1743
+ fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely.");
1744
+ return false;
1745
+ }
1746
+ switch(this->m_traits.escape_syntax_type(*m_position))
1747
+ {
1748
+ case regex_constants::escape_type_control_a:
1749
+ result = charT('\a');
1750
+ break;
1751
+ case regex_constants::escape_type_e:
1752
+ result = charT(27);
1753
+ break;
1754
+ case regex_constants::escape_type_control_f:
1755
+ result = charT('\f');
1756
+ break;
1757
+ case regex_constants::escape_type_control_n:
1758
+ result = charT('\n');
1759
+ break;
1760
+ case regex_constants::escape_type_control_r:
1761
+ result = charT('\r');
1762
+ break;
1763
+ case regex_constants::escape_type_control_t:
1764
+ result = charT('\t');
1765
+ break;
1766
+ case regex_constants::escape_type_control_v:
1767
+ result = charT('\v');
1768
+ break;
1769
+ case regex_constants::escape_type_word_assert:
1770
+ result = charT('\b');
1771
+ break;
1772
+ case regex_constants::escape_type_ascii_control:
1773
+ ++m_position;
1774
+ if(m_position == m_end)
1775
+ {
1776
+ // Rewind to start of escape:
1777
+ --m_position;
1778
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1779
+ fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely.");
1780
+ return result;
1781
+ }
1782
+ result = static_cast<charT>(*m_position % 32);
1783
+ break;
1784
+ case regex_constants::escape_type_hex:
1785
+ ++m_position;
1786
+ if(m_position == m_end)
1787
+ {
1788
+ // Rewind to start of escape:
1789
+ --m_position;
1790
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1791
+ fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely.");
1792
+ return result;
1793
+ }
1794
+ // maybe have \x{ddd}
1795
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
1796
+ {
1797
+ ++m_position;
1798
+ if(m_position == m_end)
1799
+ {
1800
+ // Rewind to start of escape:
1801
+ --m_position;
1802
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1803
+ fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
1804
+ return result;
1805
+ }
1806
+ std::intmax_t i = this->m_traits.toi(m_position, m_end, 16);
1807
+ if((m_position == m_end)
1808
+ || (i < 0)
1809
+ || ((std::numeric_limits<charT>::is_specialized) && (i > (std::intmax_t)(std::numeric_limits<charT>::max)()))
1810
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
1811
+ {
1812
+ // Rewind to start of escape:
1813
+ --m_position;
1814
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1815
+ fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid.");
1816
+ return result;
1817
+ }
1818
+ ++m_position;
1819
+ result = charT(i);
1820
+ }
1821
+ else
1822
+ {
1823
+ std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
1824
+ std::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16);
1825
+ if((i < 0)
1826
+ || !valid_value(charT(0), i))
1827
+ {
1828
+ // Rewind to start of escape:
1829
+ --m_position;
1830
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1831
+ fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character.");
1832
+ return result;
1833
+ }
1834
+ result = charT(i);
1835
+ }
1836
+ return result;
1837
+ case regex_constants::syntax_digit:
1838
+ {
1839
+ // an octal escape sequence, the first character must be a zero
1840
+ // followed by up to 3 octal digits:
1841
+ std::ptrdiff_t len = (std::min)(std::distance(m_position, m_end), static_cast<std::ptrdiff_t>(4));
1842
+ const charT* bp = m_position;
1843
+ std::intmax_t val = this->m_traits.toi(bp, bp + 1, 8);
1844
+ if(val != 0)
1845
+ {
1846
+ // Rewind to start of escape:
1847
+ --m_position;
1848
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1849
+ // Oops not an octal escape after all:
1850
+ fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence.");
1851
+ return result;
1852
+ }
1853
+ val = this->m_traits.toi(m_position, m_position + len, 8);
1854
+ if((val < 0) || (val > (std::intmax_t)(std::numeric_limits<charT>::max)()))
1855
+ {
1856
+ // Rewind to start of escape:
1857
+ --m_position;
1858
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1859
+ fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid.");
1860
+ return result;
1861
+ }
1862
+ return static_cast<charT>(val);
1863
+ }
1864
+ case regex_constants::escape_type_named_char:
1865
+ {
1866
+ ++m_position;
1867
+ if(m_position == m_end)
1868
+ {
1869
+ // Rewind to start of escape:
1870
+ --m_position;
1871
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1872
+ fail(regex_constants::error_escape, m_position - m_base);
1873
+ return false;
1874
+ }
1875
+ // maybe have \N{name}
1876
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
1877
+ {
1878
+ const charT* base = m_position;
1879
+ // skip forward until we find enclosing brace:
1880
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
1881
+ ++m_position;
1882
+ if(m_position == m_end)
1883
+ {
1884
+ // Rewind to start of escape:
1885
+ --m_position;
1886
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1887
+ fail(regex_constants::error_escape, m_position - m_base);
1888
+ return false;
1889
+ }
1890
+ string_type s = this->m_traits.lookup_collatename(++base, m_position++);
1891
+ if(s.empty())
1892
+ {
1893
+ // Rewind to start of escape:
1894
+ --m_position;
1895
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1896
+ fail(regex_constants::error_collate, m_position - m_base);
1897
+ return false;
1898
+ }
1899
+ if(s.size() == 1)
1900
+ {
1901
+ return s[0];
1902
+ }
1903
+ }
1904
+ // fall through is a failure:
1905
+ // Rewind to start of escape:
1906
+ --m_position;
1907
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1908
+ fail(regex_constants::error_escape, m_position - m_base);
1909
+ return false;
1910
+ }
1911
+ default:
1912
+ result = *m_position;
1913
+ break;
1914
+ }
1915
+ ++m_position;
1916
+ return result;
1917
+ #ifdef BOOST_REGEX_MSVC
1918
+ #pragma warning(pop)
1919
+ #endif
1920
+ }
1921
+
1922
+ template <class charT, class traits>
1923
+ bool basic_regex_parser<charT, traits>::parse_backref()
1924
+ {
1925
+ BOOST_REGEX_ASSERT(m_position != m_end);
1926
+ const charT* pc = m_position;
1927
+ std::intmax_t i = this->m_traits.toi(pc, pc + 1, 10);
1928
+ if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs)))
1929
+ {
1930
+ // not a backref at all but an octal escape sequence:
1931
+ charT c = unescape_character();
1932
+ this->append_literal(c);
1933
+ }
1934
+ else if((i > 0) && (this->m_backrefs.test((std::size_t)i)))
1935
+ {
1936
+ m_position = pc;
1937
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
1938
+ pb->index = (int)i;
1939
+ pb->icase = this->flags() & regbase::icase;
1940
+ }
1941
+ else
1942
+ {
1943
+ // Rewind to start of escape:
1944
+ --m_position;
1945
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
1946
+ fail(regex_constants::error_backref, m_position - m_base);
1947
+ return false;
1948
+ }
1949
+ return true;
1950
+ }
1951
+
1952
+ template <class charT, class traits>
1953
+ bool basic_regex_parser<charT, traits>::parse_QE()
1954
+ {
1955
+ #ifdef BOOST_REGEX_MSVC
1956
+ #pragma warning(push)
1957
+ #pragma warning(disable:4127)
1958
+ #endif
1959
+ //
1960
+ // parse a \Q...\E sequence:
1961
+ //
1962
+ ++m_position; // skip the Q
1963
+ const charT* start = m_position;
1964
+ const charT* end;
1965
+ do
1966
+ {
1967
+ while((m_position != m_end)
1968
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape))
1969
+ ++m_position;
1970
+ if(m_position == m_end)
1971
+ {
1972
+ // a \Q...\E sequence may terminate with the end of the expression:
1973
+ end = m_position;
1974
+ break;
1975
+ }
1976
+ if(++m_position == m_end) // skip the escape
1977
+ {
1978
+ fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence.");
1979
+ return false;
1980
+ }
1981
+ // check to see if it's a \E:
1982
+ if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E)
1983
+ {
1984
+ ++m_position;
1985
+ end = m_position - 2;
1986
+ break;
1987
+ }
1988
+ // otherwise go round again:
1989
+ }while(true);
1990
+ //
1991
+ // now add all the character between the two escapes as literals:
1992
+ //
1993
+ while(start != end)
1994
+ {
1995
+ this->append_literal(*start);
1996
+ ++start;
1997
+ }
1998
+ return true;
1999
+ #ifdef BOOST_REGEX_MSVC
2000
+ #pragma warning(pop)
2001
+ #endif
2002
+ }
2003
+
2004
+ template <class charT, class traits>
2005
+ bool basic_regex_parser<charT, traits>::parse_perl_extension()
2006
+ {
2007
+ if(++m_position == m_end)
2008
+ {
2009
+ // Rewind to start of (? sequence:
2010
+ --m_position;
2011
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2012
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2013
+ return false;
2014
+ }
2015
+ //
2016
+ // treat comments as a special case, as these
2017
+ // are the only ones that don't start with a leading
2018
+ // startmark state:
2019
+ //
2020
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash)
2021
+ {
2022
+ while((m_position != m_end)
2023
+ && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark))
2024
+ {}
2025
+ return true;
2026
+ }
2027
+ //
2028
+ // backup some state, and prepare the way:
2029
+ //
2030
+ int markid = 0;
2031
+ std::ptrdiff_t jump_offset = 0;
2032
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
2033
+ pb->icase = this->flags() & regbase::icase;
2034
+ std::ptrdiff_t last_paren_start = this->getoffset(pb);
2035
+ // back up insertion point for alternations, and set new point:
2036
+ std::ptrdiff_t last_alt_point = m_alt_insert_point;
2037
+ this->m_pdata->m_data.align();
2038
+ m_alt_insert_point = this->m_pdata->m_data.size();
2039
+ std::ptrdiff_t expected_alt_point = m_alt_insert_point;
2040
+ bool restore_flags = true;
2041
+ regex_constants::syntax_option_type old_flags = this->flags();
2042
+ bool old_case_change = m_has_case_change;
2043
+ m_has_case_change = false;
2044
+ charT name_delim;
2045
+ int mark_reset = m_mark_reset;
2046
+ int max_mark = m_max_mark;
2047
+ m_mark_reset = -1;
2048
+ m_max_mark = m_mark_count;
2049
+ std::intmax_t v;
2050
+ //
2051
+ // select the actual extension used:
2052
+ //
2053
+ switch(this->m_traits.syntax_type(*m_position))
2054
+ {
2055
+ case regex_constants::syntax_or:
2056
+ m_mark_reset = m_mark_count;
2057
+ BOOST_REGEX_FALLTHROUGH;
2058
+ case regex_constants::syntax_colon:
2059
+ //
2060
+ // a non-capturing mark:
2061
+ //
2062
+ pb->index = markid = 0;
2063
+ ++m_position;
2064
+ break;
2065
+ case regex_constants::syntax_digit:
2066
+ {
2067
+ //
2068
+ // a recursive subexpression:
2069
+ //
2070
+ v = this->m_traits.toi(m_position, m_end, 10);
2071
+ if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2072
+ {
2073
+ // Rewind to start of (? sequence:
2074
+ --m_position;
2075
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2076
+ fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated.");
2077
+ return false;
2078
+ }
2079
+ insert_recursion:
2080
+ pb->index = markid = 0;
2081
+ re_recurse* pr = static_cast<re_recurse*>(this->append_state(syntax_element_recurse, sizeof(re_recurse)));
2082
+ pr->alt.i = (std::ptrdiff_t)v;
2083
+ pr->state_id = 0;
2084
+ static_cast<re_case*>(
2085
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
2086
+ )->icase = this->flags() & regbase::icase;
2087
+ break;
2088
+ }
2089
+ case regex_constants::syntax_plus:
2090
+ //
2091
+ // A forward-relative recursive subexpression:
2092
+ //
2093
+ ++m_position;
2094
+ v = this->m_traits.toi(m_position, m_end, 10);
2095
+ if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2096
+ {
2097
+ // Rewind to start of (? sequence:
2098
+ --m_position;
2099
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2100
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
2101
+ return false;
2102
+ }
2103
+ if ((std::numeric_limits<std::intmax_t>::max)() - m_mark_count < v)
2104
+ {
2105
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
2106
+ return false;
2107
+ }
2108
+ v += m_mark_count;
2109
+ goto insert_recursion;
2110
+ case regex_constants::syntax_dash:
2111
+ //
2112
+ // Possibly a backward-relative recursive subexpression:
2113
+ //
2114
+ ++m_position;
2115
+ v = this->m_traits.toi(m_position, m_end, 10);
2116
+ if(v <= 0)
2117
+ {
2118
+ --m_position;
2119
+ // Oops not a relative recursion at all, but a (?-imsx) group:
2120
+ goto option_group_jump;
2121
+ }
2122
+ v = static_cast<std::intmax_t>(m_mark_count) + 1 - v;
2123
+ if(v <= 0)
2124
+ {
2125
+ // Rewind to start of (? sequence:
2126
+ --m_position;
2127
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2128
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
2129
+ return false;
2130
+ }
2131
+ goto insert_recursion;
2132
+ case regex_constants::syntax_equal:
2133
+ pb->index = markid = -1;
2134
+ ++m_position;
2135
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
2136
+ this->m_pdata->m_data.align();
2137
+ m_alt_insert_point = this->m_pdata->m_data.size();
2138
+ break;
2139
+ case regex_constants::syntax_not:
2140
+ pb->index = markid = -2;
2141
+ ++m_position;
2142
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
2143
+ this->m_pdata->m_data.align();
2144
+ m_alt_insert_point = this->m_pdata->m_data.size();
2145
+ break;
2146
+ case regex_constants::escape_type_left_word:
2147
+ {
2148
+ // a lookbehind assertion:
2149
+ if(++m_position == m_end)
2150
+ {
2151
+ // Rewind to start of (? sequence:
2152
+ --m_position;
2153
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2154
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2155
+ return false;
2156
+ }
2157
+ regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position);
2158
+ if(t == regex_constants::syntax_not)
2159
+ pb->index = markid = -2;
2160
+ else if(t == regex_constants::syntax_equal)
2161
+ pb->index = markid = -1;
2162
+ else
2163
+ {
2164
+ // Probably a named capture which also starts (?< :
2165
+ name_delim = '>';
2166
+ --m_position;
2167
+ goto named_capture_jump;
2168
+ }
2169
+ ++m_position;
2170
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
2171
+ this->append_state(syntax_element_backstep, sizeof(re_brace));
2172
+ this->m_pdata->m_data.align();
2173
+ m_alt_insert_point = this->m_pdata->m_data.size();
2174
+ break;
2175
+ }
2176
+ case regex_constants::escape_type_right_word:
2177
+ //
2178
+ // an independent sub-expression:
2179
+ //
2180
+ pb->index = markid = -3;
2181
+ ++m_position;
2182
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
2183
+ this->m_pdata->m_data.align();
2184
+ m_alt_insert_point = this->m_pdata->m_data.size();
2185
+ break;
2186
+ case regex_constants::syntax_open_mark:
2187
+ {
2188
+ // a conditional expression:
2189
+ pb->index = markid = -4;
2190
+ if(++m_position == m_end)
2191
+ {
2192
+ // Rewind to start of (? sequence:
2193
+ --m_position;
2194
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2195
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2196
+ return false;
2197
+ }
2198
+ v = this->m_traits.toi(m_position, m_end, 10);
2199
+ if(m_position == m_end)
2200
+ {
2201
+ // Rewind to start of (? sequence:
2202
+ --m_position;
2203
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2204
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2205
+ return false;
2206
+ }
2207
+ if(*m_position == charT('R'))
2208
+ {
2209
+ if(++m_position == m_end)
2210
+ {
2211
+ // Rewind to start of (? sequence:
2212
+ --m_position;
2213
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2214
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2215
+ return false;
2216
+ }
2217
+ if(*m_position == charT('&'))
2218
+ {
2219
+ const charT* base = ++m_position;
2220
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2221
+ ++m_position;
2222
+ if(m_position == m_end)
2223
+ {
2224
+ // Rewind to start of (? sequence:
2225
+ --m_position;
2226
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2227
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2228
+ return false;
2229
+ }
2230
+ v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
2231
+ }
2232
+ else
2233
+ {
2234
+ v = -this->m_traits.toi(m_position, m_end, 10);
2235
+ }
2236
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
2237
+ br->index = v < 0 ? (int)(v - 1) : 0;
2238
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
2239
+ {
2240
+ // Rewind to start of (? sequence:
2241
+ --m_position;
2242
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2243
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2244
+ return false;
2245
+ }
2246
+ if(++m_position == m_end)
2247
+ {
2248
+ // Rewind to start of (? sequence:
2249
+ --m_position;
2250
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2251
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2252
+ return false;
2253
+ }
2254
+ }
2255
+ else if((*m_position == charT('\'')) || (*m_position == charT('<')))
2256
+ {
2257
+ const charT* base = ++m_position;
2258
+ while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\'')))
2259
+ ++m_position;
2260
+ if(m_position == m_end)
2261
+ {
2262
+ // Rewind to start of (? sequence:
2263
+ --m_position;
2264
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2265
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2266
+ return false;
2267
+ }
2268
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
2269
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
2270
+ br->index = (int)v;
2271
+ if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end))
2272
+ {
2273
+ // Rewind to start of (? sequence:
2274
+ --m_position;
2275
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2276
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture.");
2277
+ return false;
2278
+ }
2279
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
2280
+ {
2281
+ // Rewind to start of (? sequence:
2282
+ --m_position;
2283
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2284
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2285
+ return false;
2286
+ }
2287
+ if(++m_position == m_end)
2288
+ {
2289
+ // Rewind to start of (? sequence:
2290
+ --m_position;
2291
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2292
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2293
+ return false;
2294
+ }
2295
+ }
2296
+ else if(*m_position == charT('D'))
2297
+ {
2298
+ const char* def = "DEFINE";
2299
+ while(*def && (m_position != m_end) && (*m_position == charT(*def)))
2300
+ ++m_position, ++def;
2301
+ if((m_position == m_end) || *def)
2302
+ {
2303
+ // Rewind to start of (? sequence:
2304
+ --m_position;
2305
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2306
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2307
+ return false;
2308
+ }
2309
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
2310
+ br->index = 9999; // special magic value!
2311
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
2312
+ {
2313
+ // Rewind to start of (? sequence:
2314
+ --m_position;
2315
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2316
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2317
+ return false;
2318
+ }
2319
+ if(++m_position == m_end)
2320
+ {
2321
+ // Rewind to start of (? sequence:
2322
+ --m_position;
2323
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2324
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2325
+ return false;
2326
+ }
2327
+ }
2328
+ else if(v > 0)
2329
+ {
2330
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
2331
+ br->index = (int)v;
2332
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
2333
+ {
2334
+ // Rewind to start of (? sequence:
2335
+ --m_position;
2336
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2337
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2338
+ return false;
2339
+ }
2340
+ if(++m_position == m_end)
2341
+ {
2342
+ // Rewind to start of (? sequence:
2343
+ --m_position;
2344
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2345
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2346
+ return false;
2347
+ }
2348
+ }
2349
+ else
2350
+ {
2351
+ // verify that we have a lookahead or lookbehind assert:
2352
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question)
2353
+ {
2354
+ // Rewind to start of (? sequence:
2355
+ --m_position;
2356
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2357
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2358
+ return false;
2359
+ }
2360
+ if(++m_position == m_end)
2361
+ {
2362
+ // Rewind to start of (? sequence:
2363
+ --m_position;
2364
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2365
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2366
+ return false;
2367
+ }
2368
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word)
2369
+ {
2370
+ if(++m_position == m_end)
2371
+ {
2372
+ // Rewind to start of (? sequence:
2373
+ --m_position;
2374
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2375
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2376
+ return false;
2377
+ }
2378
+ if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
2379
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
2380
+ {
2381
+ // Rewind to start of (? sequence:
2382
+ --m_position;
2383
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2384
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2385
+ return false;
2386
+ }
2387
+ m_position -= 3;
2388
+ }
2389
+ else
2390
+ {
2391
+ if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
2392
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
2393
+ {
2394
+ // Rewind to start of (? sequence:
2395
+ --m_position;
2396
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2397
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2398
+ return false;
2399
+ }
2400
+ m_position -= 2;
2401
+ }
2402
+ }
2403
+ break;
2404
+ }
2405
+ case regex_constants::syntax_close_mark:
2406
+ // Rewind to start of (? sequence:
2407
+ --m_position;
2408
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2409
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2410
+ return false;
2411
+ case regex_constants::escape_type_end_buffer:
2412
+ {
2413
+ name_delim = *m_position;
2414
+ named_capture_jump:
2415
+ markid = 0;
2416
+ if(0 == (this->flags() & regbase::nosubs))
2417
+ {
2418
+ markid = ++m_mark_count;
2419
+ if(this->flags() & regbase::save_subexpression_location)
2420
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 2, 0));
2421
+ }
2422
+ pb->index = markid;
2423
+ const charT* base = ++m_position;
2424
+ if(m_position == m_end)
2425
+ {
2426
+ // Rewind to start of (? sequence:
2427
+ --m_position;
2428
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2429
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2430
+ return false;
2431
+ }
2432
+ while((m_position != m_end) && (*m_position != name_delim))
2433
+ ++m_position;
2434
+ if(m_position == m_end)
2435
+ {
2436
+ // Rewind to start of (? sequence:
2437
+ --m_position;
2438
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2439
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2440
+ return false;
2441
+ }
2442
+ this->m_pdata->set_name(base, m_position, markid);
2443
+ ++m_position;
2444
+ break;
2445
+ }
2446
+ default:
2447
+ if(*m_position == charT('R'))
2448
+ {
2449
+ ++m_position;
2450
+ v = 0;
2451
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
2452
+ {
2453
+ // Rewind to start of (? sequence:
2454
+ --m_position;
2455
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2456
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2457
+ return false;
2458
+ }
2459
+ goto insert_recursion;
2460
+ }
2461
+ if(*m_position == charT('&'))
2462
+ {
2463
+ ++m_position;
2464
+ const charT* base = m_position;
2465
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2466
+ ++m_position;
2467
+ if(m_position == m_end)
2468
+ {
2469
+ // Rewind to start of (? sequence:
2470
+ --m_position;
2471
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2472
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2473
+ return false;
2474
+ }
2475
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
2476
+ goto insert_recursion;
2477
+ }
2478
+ if(*m_position == charT('P'))
2479
+ {
2480
+ ++m_position;
2481
+ if(m_position == m_end)
2482
+ {
2483
+ // Rewind to start of (? sequence:
2484
+ --m_position;
2485
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2486
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2487
+ return false;
2488
+ }
2489
+ if(*m_position == charT('>'))
2490
+ {
2491
+ ++m_position;
2492
+ const charT* base = m_position;
2493
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2494
+ ++m_position;
2495
+ if(m_position == m_end)
2496
+ {
2497
+ // Rewind to start of (? sequence:
2498
+ --m_position;
2499
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2500
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2501
+ return false;
2502
+ }
2503
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
2504
+ goto insert_recursion;
2505
+ }
2506
+ }
2507
+ //
2508
+ // lets assume that we have a (?imsx) group and try and parse it:
2509
+ //
2510
+ option_group_jump:
2511
+ regex_constants::syntax_option_type opts = parse_options();
2512
+ if(m_position == m_end)
2513
+ {
2514
+ // Rewind to start of (? sequence:
2515
+ --m_position;
2516
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2517
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2518
+ return false;
2519
+ }
2520
+ // make a note of whether we have a case change:
2521
+ m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase));
2522
+ pb->index = markid = 0;
2523
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark)
2524
+ {
2525
+ // update flags and carry on as normal:
2526
+ this->flags(opts);
2527
+ restore_flags = false;
2528
+ old_case_change |= m_has_case_change; // defer end of scope by one ')'
2529
+ }
2530
+ else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon)
2531
+ {
2532
+ // update flags and carry on until the matching ')' is found:
2533
+ this->flags(opts);
2534
+ ++m_position;
2535
+ }
2536
+ else
2537
+ {
2538
+ // Rewind to start of (? sequence:
2539
+ --m_position;
2540
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2541
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2542
+ return false;
2543
+ }
2544
+
2545
+ // finally append a case change state if we need it:
2546
+ if(m_has_case_change)
2547
+ {
2548
+ static_cast<re_case*>(
2549
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
2550
+ )->icase = opts & regbase::icase;
2551
+ }
2552
+
2553
+ }
2554
+ //
2555
+ // now recursively add more states, this will terminate when we get to a
2556
+ // matching ')' :
2557
+ //
2558
+ parse_all();
2559
+ //
2560
+ // Unwind alternatives:
2561
+ //
2562
+ if(0 == unwind_alts(last_paren_start))
2563
+ {
2564
+ // Rewind to start of (? sequence:
2565
+ --m_position;
2566
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2567
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block.");
2568
+ return false;
2569
+ }
2570
+ //
2571
+ // we either have a ')' or we have run out of characters prematurely:
2572
+ //
2573
+ if(m_position == m_end)
2574
+ {
2575
+ // Rewind to start of (? sequence:
2576
+ --m_position;
2577
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2578
+ this->fail(regex_constants::error_paren, std::distance(m_base, m_end));
2579
+ return false;
2580
+ }
2581
+ BOOST_REGEX_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
2582
+ ++m_position;
2583
+ //
2584
+ // restore the flags:
2585
+ //
2586
+ if(restore_flags)
2587
+ {
2588
+ // append a case change state if we need it:
2589
+ if(m_has_case_change)
2590
+ {
2591
+ static_cast<re_case*>(
2592
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
2593
+ )->icase = old_flags & regbase::icase;
2594
+ }
2595
+ this->flags(old_flags);
2596
+ }
2597
+ //
2598
+ // set up the jump pointer if we have one:
2599
+ //
2600
+ if(jump_offset)
2601
+ {
2602
+ this->m_pdata->m_data.align();
2603
+ re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
2604
+ jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
2605
+ if((this->m_last_state == jmp) && (markid != -2))
2606
+ {
2607
+ // Oops... we didn't have anything inside the assertion.
2608
+ // Note we don't get here for negated forward lookahead as (?!)
2609
+ // does have some uses.
2610
+ // Rewind to start of (? sequence:
2611
+ --m_position;
2612
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2613
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion.");
2614
+ return false;
2615
+ }
2616
+ }
2617
+ //
2618
+ // verify that if this is conditional expression, that we do have
2619
+ // an alternative, if not add one:
2620
+ //
2621
+ if(markid == -4)
2622
+ {
2623
+ re_syntax_base* b = this->getaddress(expected_alt_point);
2624
+ // Make sure we have exactly one alternative following this state:
2625
+ if(b->type != syntax_element_alt)
2626
+ {
2627
+ re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
2628
+ alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt);
2629
+ }
2630
+ else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast<re_alt*>(b)->alt.i + this->getoffset(b))) && (static_cast<re_alt*>(b)->alt.i > 0) && this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
2631
+ {
2632
+ // Can't have seen more than one alternative:
2633
+ // Rewind to start of (? sequence:
2634
+ --m_position;
2635
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2636
+ fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression.");
2637
+ return false;
2638
+ }
2639
+ else
2640
+ {
2641
+ // We must *not* have seen an alternative inside a (DEFINE) block:
2642
+ b = this->getaddress(b->next.i, b);
2643
+ if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
2644
+ {
2645
+ // Rewind to start of (? sequence:
2646
+ --m_position;
2647
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2648
+ fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block.");
2649
+ return false;
2650
+ }
2651
+ }
2652
+ // check for invalid repetition of next state:
2653
+ b = this->getaddress(expected_alt_point);
2654
+ b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
2655
+ if((b->type != syntax_element_assert_backref)
2656
+ && (b->type != syntax_element_startmark))
2657
+ {
2658
+ // Rewind to start of (? sequence:
2659
+ --m_position;
2660
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2661
+ fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion.");
2662
+ return false;
2663
+ }
2664
+ }
2665
+ //
2666
+ // append closing parenthesis state:
2667
+ //
2668
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
2669
+ pb->index = markid;
2670
+ pb->icase = this->flags() & regbase::icase;
2671
+ this->m_paren_start = last_paren_start;
2672
+ //
2673
+ // restore the alternate insertion point:
2674
+ //
2675
+ this->m_alt_insert_point = last_alt_point;
2676
+ //
2677
+ // and the case change data:
2678
+ //
2679
+ m_has_case_change = old_case_change;
2680
+ //
2681
+ // And the mark_reset data:
2682
+ //
2683
+ if(m_max_mark > m_mark_count)
2684
+ {
2685
+ m_mark_count = m_max_mark;
2686
+ }
2687
+ m_mark_reset = mark_reset;
2688
+ m_max_mark = max_mark;
2689
+
2690
+
2691
+ if(markid > 0)
2692
+ {
2693
+ if(this->flags() & regbase::save_subexpression_location)
2694
+ this->m_pdata->m_subs.at((std::size_t)markid - 1).second = std::distance(m_base, m_position) - 1;
2695
+ //
2696
+ // allow backrefs to this mark:
2697
+ //
2698
+ this->m_backrefs.set(markid);
2699
+ }
2700
+ return true;
2701
+ }
2702
+
2703
+ template <class charT, class traits>
2704
+ bool basic_regex_parser<charT, traits>::match_verb(const char* verb)
2705
+ {
2706
+ while(*verb)
2707
+ {
2708
+ if(static_cast<charT>(*verb) != *m_position)
2709
+ {
2710
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2711
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2712
+ return false;
2713
+ }
2714
+ if(++m_position == m_end)
2715
+ {
2716
+ --m_position;
2717
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2718
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2719
+ return false;
2720
+ }
2721
+ ++verb;
2722
+ }
2723
+ return true;
2724
+ }
2725
+
2726
+ #ifdef BOOST_REGEX_MSVC
2727
+ # pragma warning(push)
2728
+ #if BOOST_REGEX_MSVC >= 1800
2729
+ #pragma warning(disable:26812)
2730
+ #endif
2731
+ #endif
2732
+ template <class charT, class traits>
2733
+ bool basic_regex_parser<charT, traits>::parse_perl_verb()
2734
+ {
2735
+ if(++m_position == m_end)
2736
+ {
2737
+ // Rewind to start of (* sequence:
2738
+ --m_position;
2739
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2740
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2741
+ return false;
2742
+ }
2743
+ switch(*m_position)
2744
+ {
2745
+ case 'F':
2746
+ if(++m_position == m_end)
2747
+ {
2748
+ // Rewind to start of (* sequence:
2749
+ --m_position;
2750
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2751
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2752
+ return false;
2753
+ }
2754
+ if((this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) || match_verb("AIL"))
2755
+ {
2756
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2757
+ {
2758
+ // Rewind to start of (* sequence:
2759
+ --m_position;
2760
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2761
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2762
+ return false;
2763
+ }
2764
+ ++m_position;
2765
+ this->append_state(syntax_element_fail);
2766
+ return true;
2767
+ }
2768
+ break;
2769
+ case 'A':
2770
+ if(++m_position == m_end)
2771
+ {
2772
+ // Rewind to start of (* sequence:
2773
+ --m_position;
2774
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2775
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2776
+ return false;
2777
+ }
2778
+ if(match_verb("CCEPT"))
2779
+ {
2780
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2781
+ {
2782
+ // Rewind to start of (* sequence:
2783
+ --m_position;
2784
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2785
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2786
+ return false;
2787
+ }
2788
+ ++m_position;
2789
+ this->append_state(syntax_element_accept);
2790
+ return true;
2791
+ }
2792
+ break;
2793
+ case 'C':
2794
+ if(++m_position == m_end)
2795
+ {
2796
+ // Rewind to start of (* sequence:
2797
+ --m_position;
2798
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2799
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2800
+ return false;
2801
+ }
2802
+ if(match_verb("OMMIT"))
2803
+ {
2804
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2805
+ {
2806
+ // Rewind to start of (* sequence:
2807
+ --m_position;
2808
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2809
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2810
+ return false;
2811
+ }
2812
+ ++m_position;
2813
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_commit;
2814
+ this->m_pdata->m_disable_match_any = true;
2815
+ return true;
2816
+ }
2817
+ break;
2818
+ case 'P':
2819
+ if(++m_position == m_end)
2820
+ {
2821
+ // Rewind to start of (* sequence:
2822
+ --m_position;
2823
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2824
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2825
+ return false;
2826
+ }
2827
+ if(match_verb("RUNE"))
2828
+ {
2829
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2830
+ {
2831
+ // Rewind to start of (* sequence:
2832
+ --m_position;
2833
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2834
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2835
+ return false;
2836
+ }
2837
+ ++m_position;
2838
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_prune;
2839
+ this->m_pdata->m_disable_match_any = true;
2840
+ return true;
2841
+ }
2842
+ break;
2843
+ case 'S':
2844
+ if(++m_position == m_end)
2845
+ {
2846
+ // Rewind to start of (* sequence:
2847
+ --m_position;
2848
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2849
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2850
+ return false;
2851
+ }
2852
+ if(match_verb("KIP"))
2853
+ {
2854
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2855
+ {
2856
+ // Rewind to start of (* sequence:
2857
+ --m_position;
2858
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2859
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2860
+ return false;
2861
+ }
2862
+ ++m_position;
2863
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_skip;
2864
+ this->m_pdata->m_disable_match_any = true;
2865
+ return true;
2866
+ }
2867
+ break;
2868
+ case 'T':
2869
+ if(++m_position == m_end)
2870
+ {
2871
+ // Rewind to start of (* sequence:
2872
+ --m_position;
2873
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2874
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2875
+ return false;
2876
+ }
2877
+ if(match_verb("HEN"))
2878
+ {
2879
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
2880
+ {
2881
+ // Rewind to start of (* sequence:
2882
+ --m_position;
2883
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2884
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2885
+ return false;
2886
+ }
2887
+ ++m_position;
2888
+ this->append_state(syntax_element_then);
2889
+ this->m_pdata->m_disable_match_any = true;
2890
+ return true;
2891
+ }
2892
+ break;
2893
+ }
2894
+ // Rewind to start of (* sequence:
2895
+ --m_position;
2896
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
2897
+ fail(regex_constants::error_perl_extension, m_position - m_base);
2898
+ return false;
2899
+ }
2900
+ #ifdef BOOST_REGEX_MSVC
2901
+ # pragma warning(pop)
2902
+ #endif
2903
+
2904
+ template <class charT, class traits>
2905
+ bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
2906
+ {
2907
+ //
2908
+ // parses an emacs style \sx or \Sx construct.
2909
+ //
2910
+ if(++m_position == m_end)
2911
+ {
2912
+ // Rewind to start of sequence:
2913
+ --m_position;
2914
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
2915
+ fail(regex_constants::error_escape, m_position - m_base);
2916
+ return false;
2917
+ }
2918
+ basic_char_set<charT, traits> char_set;
2919
+ if(negate)
2920
+ char_set.negate();
2921
+
2922
+ static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', };
2923
+
2924
+ switch(*m_position)
2925
+ {
2926
+ case 's':
2927
+ case ' ':
2928
+ char_set.add_class(this->m_mask_space);
2929
+ break;
2930
+ case 'w':
2931
+ char_set.add_class(this->m_word_mask);
2932
+ break;
2933
+ case '_':
2934
+ char_set.add_single(digraph<charT>(charT('$')));
2935
+ char_set.add_single(digraph<charT>(charT('&')));
2936
+ char_set.add_single(digraph<charT>(charT('*')));
2937
+ char_set.add_single(digraph<charT>(charT('+')));
2938
+ char_set.add_single(digraph<charT>(charT('-')));
2939
+ char_set.add_single(digraph<charT>(charT('_')));
2940
+ char_set.add_single(digraph<charT>(charT('<')));
2941
+ char_set.add_single(digraph<charT>(charT('>')));
2942
+ break;
2943
+ case '.':
2944
+ char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5));
2945
+ break;
2946
+ case '(':
2947
+ char_set.add_single(digraph<charT>(charT('(')));
2948
+ char_set.add_single(digraph<charT>(charT('[')));
2949
+ char_set.add_single(digraph<charT>(charT('{')));
2950
+ break;
2951
+ case ')':
2952
+ char_set.add_single(digraph<charT>(charT(')')));
2953
+ char_set.add_single(digraph<charT>(charT(']')));
2954
+ char_set.add_single(digraph<charT>(charT('}')));
2955
+ break;
2956
+ case '"':
2957
+ char_set.add_single(digraph<charT>(charT('"')));
2958
+ char_set.add_single(digraph<charT>(charT('\'')));
2959
+ char_set.add_single(digraph<charT>(charT('`')));
2960
+ break;
2961
+ case '\'':
2962
+ char_set.add_single(digraph<charT>(charT('\'')));
2963
+ char_set.add_single(digraph<charT>(charT(',')));
2964
+ char_set.add_single(digraph<charT>(charT('#')));
2965
+ break;
2966
+ case '<':
2967
+ char_set.add_single(digraph<charT>(charT(';')));
2968
+ break;
2969
+ case '>':
2970
+ char_set.add_single(digraph<charT>(charT('\n')));
2971
+ char_set.add_single(digraph<charT>(charT('\f')));
2972
+ break;
2973
+ default:
2974
+ fail(regex_constants::error_ctype, m_position - m_base);
2975
+ return false;
2976
+ }
2977
+ if(0 == this->append_set(char_set))
2978
+ {
2979
+ fail(regex_constants::error_ctype, m_position - m_base);
2980
+ return false;
2981
+ }
2982
+ ++m_position;
2983
+ return true;
2984
+ }
2985
+
2986
+ template <class charT, class traits>
2987
+ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_options()
2988
+ {
2989
+ // we have a (?imsx-imsx) group, convert it into a set of flags:
2990
+ regex_constants::syntax_option_type f = this->flags();
2991
+ bool breakout = false;
2992
+ do
2993
+ {
2994
+ switch(*m_position)
2995
+ {
2996
+ case 's':
2997
+ f |= regex_constants::mod_s;
2998
+ f &= ~regex_constants::no_mod_s;
2999
+ break;
3000
+ case 'm':
3001
+ f &= ~regex_constants::no_mod_m;
3002
+ break;
3003
+ case 'i':
3004
+ f |= regex_constants::icase;
3005
+ break;
3006
+ case 'x':
3007
+ f |= regex_constants::mod_x;
3008
+ break;
3009
+ default:
3010
+ breakout = true;
3011
+ continue;
3012
+ }
3013
+ if(++m_position == m_end)
3014
+ {
3015
+ // Rewind to start of (? sequence:
3016
+ --m_position;
3017
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
3018
+ fail(regex_constants::error_paren, m_position - m_base);
3019
+ return false;
3020
+ }
3021
+ }
3022
+ while(!breakout);
3023
+
3024
+ breakout = false;
3025
+
3026
+ if(*m_position == static_cast<charT>('-'))
3027
+ {
3028
+ if(++m_position == m_end)
3029
+ {
3030
+ // Rewind to start of (? sequence:
3031
+ --m_position;
3032
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
3033
+ fail(regex_constants::error_paren, m_position - m_base);
3034
+ return false;
3035
+ }
3036
+ do
3037
+ {
3038
+ switch(*m_position)
3039
+ {
3040
+ case 's':
3041
+ f &= ~regex_constants::mod_s;
3042
+ f |= regex_constants::no_mod_s;
3043
+ break;
3044
+ case 'm':
3045
+ f |= regex_constants::no_mod_m;
3046
+ break;
3047
+ case 'i':
3048
+ f &= ~regex_constants::icase;
3049
+ break;
3050
+ case 'x':
3051
+ f &= ~regex_constants::mod_x;
3052
+ break;
3053
+ default:
3054
+ breakout = true;
3055
+ continue;
3056
+ }
3057
+ if(++m_position == m_end)
3058
+ {
3059
+ // Rewind to start of (? sequence:
3060
+ --m_position;
3061
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
3062
+ fail(regex_constants::error_paren, m_position - m_base);
3063
+ return false;
3064
+ }
3065
+ }
3066
+ while(!breakout);
3067
+ }
3068
+ return f;
3069
+ }
3070
+
3071
+ template <class charT, class traits>
3072
+ bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_start)
3073
+ {
3074
+ //
3075
+ // If we didn't actually add any states after the last
3076
+ // alternative then that's an error:
3077
+ //
3078
+ if((this->m_alt_insert_point == static_cast<std::ptrdiff_t>(this->m_pdata->m_data.size()))
3079
+ && (!m_alt_jumps.empty()) && (m_alt_jumps.back() > last_paren_start)
3080
+ &&
3081
+ !(
3082
+ ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
3083
+ &&
3084
+ ((this->flags() & regbase::no_empty_expressions) == 0)
3085
+ )
3086
+ )
3087
+ {
3088
+ fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |.");
3089
+ return false;
3090
+ }
3091
+ //
3092
+ // Fix up our alternatives:
3093
+ //
3094
+ while((!m_alt_jumps.empty()) && (m_alt_jumps.back() > last_paren_start))
3095
+ {
3096
+ //
3097
+ // fix up the jump to point to the end of the states
3098
+ // that we've just added:
3099
+ //
3100
+ std::ptrdiff_t jump_offset = m_alt_jumps.back();
3101
+ m_alt_jumps.pop_back();
3102
+ this->m_pdata->m_data.align();
3103
+ re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
3104
+ BOOST_REGEX_ASSERT(jmp->type == syntax_element_jump);
3105
+ jmp->alt.i = this->m_pdata->m_data.size() - jump_offset;
3106
+ }
3107
+ return true;
3108
+ }
3109
+
3110
+ #ifdef BOOST_REGEX_MSVC
3111
+ #pragma warning(pop)
3112
+ #endif
3113
+
3114
+ } // namespace BOOST_REGEX_DETAIL_NS
3115
+ } // namespace boost
3116
+
3117
+ #endif