passenger 6.1.0 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +32 -2
  3. data/Rakefile +6 -13
  4. data/bin/passenger-install-apache2-module +15 -19
  5. data/bin/passenger-install-nginx-module +42 -44
  6. data/bin/passenger-status +9 -10
  7. data/build/common_library.rb +4 -4
  8. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
  9. data/build/test_basics.rb +4 -3
  10. data/dev/copy_boost_headers +54 -40
  11. data/dev/ruby_server.rb +1 -1
  12. data/src/agent/Core/Config.h +1 -1
  13. data/src/agent/Core/Controller/Config.h +1 -1
  14. data/src/agent/Watchdog/Config.h +1 -1
  15. data/src/cxx_supportlib/Constants.h +1 -1
  16. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +8 -1
  17. data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +6 -0
  18. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +94 -110
  19. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_flag.hpp +2 -2
  20. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_ref.hpp +14 -14
  21. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/addressof.hpp +3 -3
  22. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag_impl.hpp +52 -24
  23. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_impl.hpp +641 -285
  24. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +593 -260
  25. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +37 -24
  26. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_fp_cast.hpp +9 -9
  27. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas_based_exchange.hpp +3 -3
  28. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/chrono.hpp +93 -0
  29. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/classify.hpp +16 -17
  30. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +25 -34
  31. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp +204 -97
  32. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp +251 -122
  33. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_alpha.hpp +56 -56
  34. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_arm.hpp +129 -129
  35. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_ppc.hpp +253 -125
  36. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_sparc.hpp +25 -25
  37. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +193 -126
  38. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_arm.hpp +57 -57
  39. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +96 -97
  40. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_emulated.hpp +24 -24
  41. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_cas_based.hpp +10 -10
  42. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_gcc_atomic.hpp +27 -24
  43. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_gcc_sync.hpp +39 -37
  44. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_linux_arm.hpp +17 -17
  45. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extending_cas_based_arithmetic.hpp +5 -5
  46. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_emulated.hpp +12 -12
  47. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_generic.hpp +21 -21
  48. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_emulated.hpp +30 -30
  49. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch32.hpp +170 -98
  50. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch64.hpp +209 -119
  51. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_arm.hpp +95 -95
  52. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_ppc.hpp +148 -76
  53. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_x86.hpp +293 -123
  54. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_generic.hpp +87 -71
  55. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_arm.hpp +5 -5
  56. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_x86.hpp +88 -88
  57. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_operations.hpp +2 -2
  58. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp +4 -5
  59. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch64.hpp +4 -4
  60. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_alpha.hpp +4 -4
  61. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp +9 -9
  62. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_ppc.hpp +4 -4
  63. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_sparc.hpp +4 -4
  64. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp +4 -4
  65. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_arm.hpp +5 -5
  66. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp +6 -6
  67. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations.hpp +2 -2
  68. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations_emulated.hpp +2 -2
  69. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_atomic.hpp +5 -5
  70. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_sync.hpp +4 -4
  71. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_linux_arm.hpp +7 -7
  72. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_emulated.hpp +7 -7
  73. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_generic.hpp +6 -6
  74. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/futex.hpp +110 -49
  75. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp +1 -1
  76. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/has_posix_clock_traits.hpp +51 -0
  77. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +26 -32
  78. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/integral_conversions.hpp +15 -15
  79. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +69 -30
  80. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/intptr.hpp +8 -8
  81. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lock_pool.hpp +51 -31
  82. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/memory_order_utils.hpp +2 -2
  83. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/once_flag.hpp +2 -2
  84. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm_common.hpp +6 -6
  85. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc_common.hpp +4 -4
  86. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +5 -5
  87. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_traits.hpp +31 -31
  88. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/alignment_of.hpp +2 -3
  89. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/has_unique_object_representations.hpp +2 -5
  90. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_floating_point.hpp +3 -3
  91. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_iec559.hpp +2 -2
  92. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_integral.hpp +3 -3
  93. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_signed.hpp +3 -3
  94. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_copyable.hpp +20 -13
  95. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp +13 -13
  96. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_signed.hpp +3 -3
  97. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_unsigned.hpp +3 -3
  98. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_darwin_ulock.hpp +90 -16
  99. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp +80 -11
  100. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_emulated.hpp +160 -15
  101. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_freebsd_umtx.hpp +327 -38
  102. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_futex.hpp +276 -33
  103. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_generic.hpp +260 -20
  104. data/src/cxx_supportlib/vendor-modified/boost/atomic/fences.hpp +4 -3
  105. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic.hpp +14 -18
  106. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_flag.hpp +2 -2
  107. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_ref.hpp +13 -13
  108. data/src/cxx_supportlib/vendor-modified/boost/atomic/posix_clock_traits_fwd.hpp +59 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/atomic/thread_pause.hpp +102 -0
  110. data/src/cxx_supportlib/vendor-modified/boost/atomic/wait_result.hpp +56 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/atomic.hpp +4 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +5 -0
  113. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
  114. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +108 -41
  115. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +1235 -1009
  116. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +3 -2
  117. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +56 -0
  118. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +1 -0
  119. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +9 -9
  120. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +23 -2
  121. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +0 -1
  122. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +88 -23
  123. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +2 -1
  124. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +2 -2
  125. data/src/cxx_supportlib/vendor-modified/boost/container/detail/operator_new_helpers.hpp +68 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +72 -13
  127. data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +13 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +8 -5
  129. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +31 -10
  130. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +37 -10
  131. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +19 -0
  132. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -1
  133. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +72 -5
  134. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +3 -10
  135. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +54 -23
  136. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/devector.hpp +6 -4
  137. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +19 -0
  138. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +32 -5
  139. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +27 -2
  140. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +22 -0
  141. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +37 -17
  142. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +23 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +41 -20
  144. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +5 -8
  145. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +3 -1
  146. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_is_avalanching.hpp +57 -0
  147. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +29 -29
  148. data/src/cxx_supportlib/vendor-modified/boost/core/cmath.hpp +3 -3
  149. data/src/cxx_supportlib/vendor-modified/boost/core/data.hpp +15 -1
  150. data/src/cxx_supportlib/vendor-modified/boost/core/default_allocator.hpp +1 -0
  151. data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +1 -1
  152. data/src/cxx_supportlib/vendor-modified/boost/core/detail/assert.hpp +18 -0
  153. data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_sleep.hpp +2 -2
  154. data/src/cxx_supportlib/vendor-modified/boost/core/detail/static_assert.hpp +42 -0
  155. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +16 -10
  156. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +35 -27
  157. data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +1 -1
  158. data/src/cxx_supportlib/vendor-modified/boost/core/size.hpp +14 -0
  159. data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +20 -9
  160. data/src/cxx_supportlib/vendor-modified/boost/cregex.hpp +0 -5
  161. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +8 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/describe/modifiers.hpp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +1 -0
  164. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +4 -4
  165. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +2 -2
  166. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_rebind.hpp +9 -0
  167. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +1 -0
  168. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +2 -2
  169. data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +43 -64
  170. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_def.hpp +0 -83
  171. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_undef.hpp +1 -5
  172. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/eval_if_default.hpp +44 -0
  173. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +103 -117
  174. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/conjunction.hpp +53 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/disjunction.hpp +53 -0
  176. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/negation.hpp +53 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/type_identity.hpp +54 -0
  178. data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +32 -38
  179. data/src/cxx_supportlib/vendor-modified/boost/iterator/enable_if_convertible.hpp +84 -0
  180. data/src/cxx_supportlib/vendor-modified/boost/iterator/interoperable.hpp +22 -34
  181. data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +16 -16
  182. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +162 -309
  183. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_categories.hpp +52 -161
  184. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +3 -11
  185. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +804 -977
  186. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_traits.hpp +24 -17
  187. data/src/cxx_supportlib/vendor-modified/boost/iterator/min_category.hpp +83 -0
  188. data/src/cxx_supportlib/vendor-modified/boost/iterator/minimum_category.hpp +11 -73
  189. data/src/cxx_supportlib/vendor-modified/boost/iterator/reverse_iterator.hpp +56 -57
  190. data/src/cxx_supportlib/vendor-modified/boost/iterator/transform_iterator.hpp +123 -156
  191. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +1 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +1 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +36 -33
  194. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +43 -50
  195. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +23 -27
  196. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +10 -11
  198. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +1 -1
  199. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
  200. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +6 -7
  201. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/type_traits.hpp +81 -0
  202. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +4 -4
  203. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +8 -9
  204. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
  205. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +1 -12
  206. data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +8 -26
  207. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_to_raw_pointer.hpp +1 -1
  208. data/src/cxx_supportlib/vendor-modified/boost/move/detail/launder.hpp +1 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_begin.hpp +6 -0
  210. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +2 -2
  211. data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +11 -44
  212. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +34 -0
  213. data/src/cxx_supportlib/vendor-modified/boost/mp11/set.hpp +33 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  215. data/src/cxx_supportlib/vendor-modified/boost/mpl/and.hpp +4 -8
  216. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_assert.hpp +1 -1
  217. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/ptr_to_ref.hpp +1 -1
  218. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitand.hpp +2 -6
  219. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitor.hpp +2 -6
  220. data/src/cxx_supportlib/vendor-modified/boost/mpl/or.hpp +2 -6
  221. data/src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/pool/simple_segregated_storage.hpp +0 -13
  223. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_seq_256.hpp +190 -190
  224. data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +12 -2
  225. data/src/cxx_supportlib/vendor-modified/boost/random/detail/config.hpp +4 -0
  226. data/src/cxx_supportlib/vendor-modified/boost/random/detail/size.hpp +41 -0
  227. data/src/cxx_supportlib/vendor-modified/boost/random/detail/xoshiro_base.hpp +472 -0
  228. data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +7 -10
  229. data/src/cxx_supportlib/vendor-modified/boost/random/gamma_distribution.hpp +1 -1
  230. data/src/cxx_supportlib/vendor-modified/boost/random/generalized_inverse_gaussian_distribution.hpp +339 -0
  231. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +12 -14
  232. data/src/cxx_supportlib/vendor-modified/boost/random/inverse_gaussian_distribution.hpp +226 -0
  233. data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +1 -4
  234. data/src/cxx_supportlib/vendor-modified/boost/random/mixmax.hpp +63 -63
  235. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_constant_distribution.hpp +7 -10
  236. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_linear_distribution.hpp +8 -11
  237. data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +1 -3
  238. data/src/cxx_supportlib/vendor-modified/boost/random/splitmix64.hpp +1 -4
  239. data/src/cxx_supportlib/vendor-modified/boost/random/xoshiro.hpp +488 -0
  240. data/src/cxx_supportlib/vendor-modified/boost/random.hpp +3 -0
  241. data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +2 -0
  242. data/src/cxx_supportlib/vendor-modified/boost/range/detail/has_member_size.hpp +1 -0
  243. data/src/cxx_supportlib/vendor-modified/boost/range/detail/msvc_has_iterator_workaround.hpp +2 -0
  244. data/src/cxx_supportlib/vendor-modified/boost/range/has_range_iterator.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/range/iterator.hpp +1 -0
  246. data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +4 -1
  247. data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +35 -18
  249. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +18 -101
  250. data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +0 -4
  251. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/object_cache.hpp +0 -4
  252. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +0 -6
  253. data/src/cxx_supportlib/vendor-modified/boost/regex/regex_traits.hpp +0 -4
  254. data/src/cxx_supportlib/vendor-modified/boost/regex/user.hpp +4 -10
  255. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex.hpp +63 -17
  256. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_creator.hpp +71 -16
  257. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_parser.hpp +22 -1
  258. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/c_regex_traits.hpp +11 -4
  259. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/char_regex_traits.hpp +2 -0
  260. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cpp_regex_traits.hpp +11 -8
  261. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cregex.hpp +2 -1
  262. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/error_type.hpp +1 -1
  263. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +40 -38
  264. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_category.hpp +2 -0
  265. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_traits.hpp +4 -0
  266. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_flags.hpp +39 -37
  267. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_results.hpp +46 -9
  268. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/mem_block_cache.hpp +4 -0
  269. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/object_cache.hpp +2 -0
  270. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/pattern_except.hpp +6 -4
  271. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher.hpp +57 -8
  272. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_common.hpp +21 -6
  273. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_non_recursive.hpp +18 -3
  274. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regbase.hpp +4 -2
  275. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex.hpp +6 -6
  276. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_format.hpp +23 -18
  277. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_fwd.hpp +9 -9
  278. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_grep.hpp +9 -5
  279. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_iterator.hpp +11 -7
  280. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_match.hpp +10 -7
  281. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_merge.hpp +4 -4
  282. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_raw_buffer.hpp +3 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_replace.hpp +6 -2
  284. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_search.hpp +12 -9
  285. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_split.hpp +6 -3
  286. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_token_iterator.hpp +16 -11
  287. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_traits.hpp +1 -1
  288. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_traits_defaults.hpp +2 -0
  289. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +2 -0
  290. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/states.hpp +7 -0
  291. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/sub_match.hpp +54 -49
  292. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/syntax_type.hpp +64 -62
  293. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_iterator.hpp +16 -0
  294. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_token_iterator.hpp +12 -0
  295. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/unicode_iterator.hpp +6 -4
  296. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/w32_regex_traits.hpp +3 -1
  297. data/src/cxx_supportlib/vendor-modified/boost/regex.hpp +0 -4
  298. data/src/cxx_supportlib/vendor-modified/boost/regex_fwd.hpp +0 -4
  299. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +1 -43
  300. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/deprecated_macros.hpp +7 -7
  301. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +2 -77
  302. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +1 -64
  303. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +3 -3
  304. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -77
  305. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_cxx20_constexpr.hpp +37 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +5 -28
  307. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +41 -40
  308. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +0 -15
  309. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +0 -18
  310. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +1 -1
  311. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +1 -1
  312. data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +1 -0
  313. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +8 -6
  314. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complete.hpp +31 -10
  315. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +34 -8
  316. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +6 -4
  317. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +9 -1
  318. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +5 -5
  319. data/src/cxx_supportlib/vendor-modified/boost/unordered/{unordered_printers.hpp → detail/unordered_printers.hpp} +34 -36
  320. data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +6 -49
  321. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +6 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +6 -1
  323. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +6 -1
  324. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +6 -1
  325. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  326. data/src/nginx_module/ContentHandler.c +2 -0
  327. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +3 -5
  328. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +3 -5
  329. data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +3 -5
  330. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +3 -5
  331. data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +1 -1
  332. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +2 -2
  333. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +5 -3
  334. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +2 -2
  335. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +6 -13
  336. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +29 -30
  337. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -3
  338. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +2 -0
  339. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -1
  340. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +1 -1
  341. data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +1 -1
  342. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +1 -1
  343. data/src/ruby_supportlib/phusion_passenger.rb +8 -8
  344. metadata +26 -99
  345. data/src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp +0 -47
  346. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc_posix.hpp +0 -41
  347. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc_sunos.hpp +0 -34
  348. data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -28
  349. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +0 -68
  350. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/conditional.hpp +0 -42
  351. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/integral_constant.hpp +0 -46
  352. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_enum.hpp +0 -42
  353. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_function.hpp +0 -42
  354. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_nothrow_default_constructible.hpp +0 -46
  355. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/remove_cv.hpp +0 -42
  356. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_on_address.hpp +0 -64
  357. data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +0 -15
  358. data/src/cxx_supportlib/vendor-modified/boost/detail/indirect_traits.hpp +0 -195
  359. data/src/cxx_supportlib/vendor-modified/boost/detail/select_type.hpp +0 -36
  360. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/enable_if.hpp +0 -83
  361. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/internals.hpp +0 -35
  362. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +0 -120
  363. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_debug.cpp +0 -59
  364. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +0 -189
  365. data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/error_code.cpp +0 -31
  366. data/src/cxx_supportlib/vendor-modified/boost/regex/config/borland.hpp +0 -72
  367. data/src/cxx_supportlib/vendor-modified/boost/regex/config/cwchar.hpp +0 -207
  368. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/static_mutex.hpp +0 -182
  369. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +0 -797
  370. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +0 -1598
  371. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +0 -3174
  372. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/c_regex_traits.hpp +0 -511
  373. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/char_regex_traits.hpp +0 -81
  374. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +0 -1237
  375. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +0 -213
  376. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/error_type.hpp +0 -59
  377. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/icu.hpp +0 -1516
  378. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp +0 -54
  379. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp +0 -91
  380. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_traits.hpp +0 -135
  381. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +0 -161
  382. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +0 -716
  383. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +0 -183
  384. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/object_cache.hpp +0 -171
  385. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/pattern_except.hpp +0 -128
  386. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +0 -645
  387. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +0 -1030
  388. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +0 -1947
  389. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +0 -1131
  390. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/primary_transform.hpp +0 -146
  391. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/protected_call.hpp +0 -83
  392. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regbase.hpp +0 -180
  393. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex.hpp +0 -166
  394. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +0 -1158
  395. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_fwd.hpp +0 -73
  396. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_grep.hpp +0 -155
  397. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +0 -195
  398. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_match.hpp +0 -382
  399. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_merge.hpp +0 -93
  400. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +0 -241
  401. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_replace.hpp +0 -99
  402. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_search.hpp +0 -217
  403. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_split.hpp +0 -174
  404. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +0 -327
  405. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +0 -189
  406. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +0 -997
  407. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +0 -237
  408. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/states.hpp +0 -321
  409. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/sub_match.hpp +0 -516
  410. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/syntax_type.hpp +0 -105
  411. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_iterator.hpp +0 -185
  412. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +0 -360
  413. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/unicode_iterator.hpp +0 -871
  414. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +0 -1229
  415. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
  416. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
  417. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
  418. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
  419. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
  420. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
  421. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
  422. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
  423. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
  424. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
  425. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
  426. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
  427. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
  428. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
  429. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
  430. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
  431. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
  432. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
  433. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
  434. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
  435. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -30
  436. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
  437. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +0 -128
  438. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_nt.hpp +0 -96
  439. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_pt.hpp +0 -86
  440. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_sync.hpp +0 -94
@@ -1,1237 +0,0 @@
1
- /*
2
- *
3
- * Copyright (c) 2004 John Maddock
4
- * Copyright 2011 Garmin Ltd. or its subsidiaries
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 cpp_regex_traits.hpp
15
- * VERSION see <boost/version.hpp>
16
- * DESCRIPTION: Declares regular expression traits class cpp_regex_traits.
17
- */
18
-
19
- #ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
20
- #define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
21
-
22
- #include <boost/config.hpp>
23
- #include <boost/integer.hpp>
24
- #include <boost/type_traits/make_unsigned.hpp>
25
-
26
- #ifndef BOOST_NO_STD_LOCALE
27
-
28
- #ifndef BOOST_RE_PAT_EXCEPT_HPP
29
- #include <boost/regex/pattern_except.hpp>
30
- #endif
31
- #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
32
- #include <boost/regex/v4/regex_traits_defaults.hpp>
33
- #endif
34
- #ifdef BOOST_HAS_THREADS
35
- #include <boost/regex/pending/static_mutex.hpp>
36
- #endif
37
- #ifndef BOOST_REGEX_PRIMARY_TRANSFORM
38
- #include <boost/regex/v4/primary_transform.hpp>
39
- #endif
40
- #ifndef BOOST_REGEX_OBJECT_CACHE_HPP
41
- #include <boost/regex/v4/object_cache.hpp>
42
- #endif
43
-
44
- #include <climits>
45
- #include <ios>
46
- #include <istream>
47
-
48
- #ifdef BOOST_MSVC
49
- #pragma warning(push)
50
- #pragma warning(disable: 4103)
51
- #endif
52
- #ifdef BOOST_HAS_ABI_HEADERS
53
- # include BOOST_ABI_PREFIX
54
- #endif
55
- #ifdef BOOST_MSVC
56
- #pragma warning(pop)
57
- #endif
58
-
59
- #ifdef BOOST_MSVC
60
- #pragma warning(push)
61
- #pragma warning(disable:4786 4251)
62
- #endif
63
-
64
- namespace boost{
65
-
66
- //
67
- // forward declaration is needed by some compilers:
68
- //
69
- template <class charT>
70
- class cpp_regex_traits;
71
-
72
- namespace BOOST_REGEX_DETAIL_NS{
73
-
74
- //
75
- // class parser_buf:
76
- // acts as a stream buffer which wraps around a pair of pointers:
77
- //
78
- template <class charT,
79
- class traits = ::std::char_traits<charT> >
80
- class parser_buf : public ::std::basic_streambuf<charT, traits>
81
- {
82
- typedef ::std::basic_streambuf<charT, traits> base_type;
83
- typedef typename base_type::int_type int_type;
84
- typedef typename base_type::char_type char_type;
85
- typedef typename base_type::pos_type pos_type;
86
- typedef ::std::streamsize streamsize;
87
- typedef typename base_type::off_type off_type;
88
- public:
89
- parser_buf() : base_type() { setbuf(0, 0); }
90
- const charT* getnext() { return this->gptr(); }
91
- protected:
92
- std::basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) BOOST_OVERRIDE;
93
- typename parser_buf<charT, traits>::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) BOOST_OVERRIDE;
94
- typename parser_buf<charT, traits>::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) BOOST_OVERRIDE;
95
- private:
96
- parser_buf& operator=(const parser_buf&);
97
- parser_buf(const parser_buf&);
98
- };
99
-
100
- template<class charT, class traits>
101
- std::basic_streambuf<charT, traits>*
102
- parser_buf<charT, traits>::setbuf(char_type* s, streamsize n)
103
- {
104
- this->setg(s, s, s + n);
105
- return this;
106
- }
107
-
108
- template<class charT, class traits>
109
- typename parser_buf<charT, traits>::pos_type
110
- parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)
111
- {
112
- typedef typename boost::int_t<sizeof(way) * CHAR_BIT>::least cast_type;
113
-
114
- if(which & ::std::ios_base::out)
115
- return pos_type(off_type(-1));
116
- std::ptrdiff_t size = this->egptr() - this->eback();
117
- std::ptrdiff_t pos = this->gptr() - this->eback();
118
- charT* g = this->eback();
119
- switch(static_cast<cast_type>(way))
120
- {
121
- case ::std::ios_base::beg:
122
- if((off < 0) || (off > size))
123
- return pos_type(off_type(-1));
124
- else
125
- this->setg(g, g + off, g + size);
126
- break;
127
- case ::std::ios_base::end:
128
- if((off < 0) || (off > size))
129
- return pos_type(off_type(-1));
130
- else
131
- this->setg(g, g + size - off, g + size);
132
- break;
133
- case ::std::ios_base::cur:
134
- {
135
- std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off);
136
- if((newpos < 0) || (newpos > size))
137
- return pos_type(off_type(-1));
138
- else
139
- this->setg(g, g + newpos, g + size);
140
- break;
141
- }
142
- default: ;
143
- }
144
- #ifdef BOOST_MSVC
145
- #pragma warning(push)
146
- #pragma warning(disable:4244)
147
- #endif
148
- return static_cast<pos_type>(this->gptr() - this->eback());
149
- #ifdef BOOST_MSVC
150
- #pragma warning(pop)
151
- #endif
152
- }
153
-
154
- template<class charT, class traits>
155
- typename parser_buf<charT, traits>::pos_type
156
- parser_buf<charT, traits>::seekpos(pos_type sp, ::std::ios_base::openmode which)
157
- {
158
- if(which & ::std::ios_base::out)
159
- return pos_type(off_type(-1));
160
- off_type size = static_cast<off_type>(this->egptr() - this->eback());
161
- charT* g = this->eback();
162
- if(off_type(sp) <= size)
163
- {
164
- this->setg(g, g + off_type(sp), g + size);
165
- }
166
- return pos_type(off_type(-1));
167
- }
168
-
169
- //
170
- // class cpp_regex_traits_base:
171
- // acts as a container for locale and the facets we are using.
172
- //
173
- template <class charT>
174
- struct cpp_regex_traits_base
175
- {
176
- cpp_regex_traits_base(const std::locale& l)
177
- { (void)imbue(l); }
178
- std::locale imbue(const std::locale& l);
179
-
180
- std::locale m_locale;
181
- std::ctype<charT> const* m_pctype;
182
- #ifndef BOOST_NO_STD_MESSAGES
183
- std::messages<charT> const* m_pmessages;
184
- #endif
185
- std::collate<charT> const* m_pcollate;
186
-
187
- bool operator<(const cpp_regex_traits_base& b)const
188
- {
189
- if(m_pctype == b.m_pctype)
190
- {
191
- #ifndef BOOST_NO_STD_MESSAGES
192
- if(m_pmessages == b.m_pmessages)
193
- {
194
- return m_pcollate < b.m_pcollate;
195
- }
196
- return m_pmessages < b.m_pmessages;
197
- #else
198
- return m_pcollate < b.m_pcollate;
199
- #endif
200
- }
201
- return m_pctype < b.m_pctype;
202
- }
203
- bool operator==(const cpp_regex_traits_base& b)const
204
- {
205
- return (m_pctype == b.m_pctype)
206
- #ifndef BOOST_NO_STD_MESSAGES
207
- && (m_pmessages == b.m_pmessages)
208
- #endif
209
- && (m_pcollate == b.m_pcollate);
210
- }
211
- };
212
-
213
- template <class charT>
214
- std::locale cpp_regex_traits_base<charT>::imbue(const std::locale& l)
215
- {
216
- std::locale result(m_locale);
217
- m_locale = l;
218
- m_pctype = &BOOST_USE_FACET(std::ctype<charT>, l);
219
- #ifndef BOOST_NO_STD_MESSAGES
220
- m_pmessages = BOOST_HAS_FACET(std::messages<charT>, l) ? &BOOST_USE_FACET(std::messages<charT>, l) : 0;
221
- #endif
222
- m_pcollate = &BOOST_USE_FACET(std::collate<charT>, l);
223
- return result;
224
- }
225
-
226
- //
227
- // class cpp_regex_traits_char_layer:
228
- // implements methods that require specialization for narrow characters:
229
- //
230
- template <class charT>
231
- class cpp_regex_traits_char_layer : public cpp_regex_traits_base<charT>
232
- {
233
- typedef std::basic_string<charT> string_type;
234
- typedef std::map<charT, regex_constants::syntax_type> map_type;
235
- typedef typename map_type::const_iterator map_iterator_type;
236
- public:
237
- cpp_regex_traits_char_layer(const std::locale& l)
238
- : cpp_regex_traits_base<charT>(l)
239
- {
240
- init();
241
- }
242
- cpp_regex_traits_char_layer(const cpp_regex_traits_base<charT>& b)
243
- : cpp_regex_traits_base<charT>(b)
244
- {
245
- init();
246
- }
247
- void init();
248
-
249
- regex_constants::syntax_type syntax_type(charT c)const
250
- {
251
- map_iterator_type i = m_char_map.find(c);
252
- return ((i == m_char_map.end()) ? 0 : i->second);
253
- }
254
- regex_constants::escape_syntax_type escape_syntax_type(charT c) const
255
- {
256
- map_iterator_type i = m_char_map.find(c);
257
- if(i == m_char_map.end())
258
- {
259
- if(this->m_pctype->is(std::ctype_base::lower, c)) return regex_constants::escape_type_class;
260
- if(this->m_pctype->is(std::ctype_base::upper, c)) return regex_constants::escape_type_not_class;
261
- return 0;
262
- }
263
- return i->second;
264
- }
265
-
266
- private:
267
- string_type get_default_message(regex_constants::syntax_type);
268
- // TODO: use a hash table when available!
269
- map_type m_char_map;
270
- };
271
-
272
- template <class charT>
273
- void cpp_regex_traits_char_layer<charT>::init()
274
- {
275
- // we need to start by initialising our syntax map so we know which
276
- // character is used for which purpose:
277
- #ifndef BOOST_NO_STD_MESSAGES
278
- #ifndef __IBMCPP__
279
- typename std::messages<charT>::catalog cat = static_cast<std::messages<char>::catalog>(-1);
280
- #else
281
- typename std::messages<charT>::catalog cat = reinterpret_cast<std::messages<char>::catalog>(-1);
282
- #endif
283
- std::string cat_name(cpp_regex_traits<charT>::get_catalog_name());
284
- if((!cat_name.empty()) && (this->m_pmessages != 0))
285
- {
286
- cat = this->m_pmessages->open(
287
- cat_name,
288
- this->m_locale);
289
- if((int)cat < 0)
290
- {
291
- std::string m("Unable to open message catalog: ");
292
- std::runtime_error err(m + cat_name);
293
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
294
- }
295
- }
296
- //
297
- // if we have a valid catalog then load our messages:
298
- //
299
- if((int)cat >= 0)
300
- {
301
- #ifndef BOOST_NO_EXCEPTIONS
302
- try{
303
- #endif
304
- for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
305
- {
306
- string_type mss = this->m_pmessages->get(cat, 0, i, get_default_message(i));
307
- for(typename string_type::size_type j = 0; j < mss.size(); ++j)
308
- {
309
- m_char_map[mss[j]] = i;
310
- }
311
- }
312
- this->m_pmessages->close(cat);
313
- #ifndef BOOST_NO_EXCEPTIONS
314
- }
315
- catch(...)
316
- {
317
- if(this->m_pmessages)
318
- this->m_pmessages->close(cat);
319
- throw;
320
- }
321
- #endif
322
- }
323
- else
324
- {
325
- #endif
326
- for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
327
- {
328
- const char* ptr = get_default_syntax(i);
329
- while(ptr && *ptr)
330
- {
331
- m_char_map[this->m_pctype->widen(*ptr)] = i;
332
- ++ptr;
333
- }
334
- }
335
- #ifndef BOOST_NO_STD_MESSAGES
336
- }
337
- #endif
338
- }
339
-
340
- template <class charT>
341
- typename cpp_regex_traits_char_layer<charT>::string_type
342
- cpp_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i)
343
- {
344
- const char* ptr = get_default_syntax(i);
345
- string_type result;
346
- while(ptr && *ptr)
347
- {
348
- result.append(1, this->m_pctype->widen(*ptr));
349
- ++ptr;
350
- }
351
- return result;
352
- }
353
-
354
- //
355
- // specialized version for narrow characters:
356
- //
357
- template <>
358
- class cpp_regex_traits_char_layer<char> : public cpp_regex_traits_base<char>
359
- {
360
- typedef std::string string_type;
361
- public:
362
- cpp_regex_traits_char_layer(const std::locale& l)
363
- : cpp_regex_traits_base<char>(l)
364
- {
365
- init();
366
- }
367
- cpp_regex_traits_char_layer(const cpp_regex_traits_base<char>& l)
368
- : cpp_regex_traits_base<char>(l)
369
- {
370
- init();
371
- }
372
-
373
- regex_constants::syntax_type syntax_type(char c)const
374
- {
375
- return m_char_map[static_cast<unsigned char>(c)];
376
- }
377
- regex_constants::escape_syntax_type escape_syntax_type(char c) const
378
- {
379
- return m_char_map[static_cast<unsigned char>(c)];
380
- }
381
-
382
- private:
383
- regex_constants::syntax_type m_char_map[1u << CHAR_BIT];
384
- void init();
385
- };
386
-
387
- #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
388
- enum
389
- {
390
- char_class_space=1<<0,
391
- char_class_print=1<<1,
392
- char_class_cntrl=1<<2,
393
- char_class_upper=1<<3,
394
- char_class_lower=1<<4,
395
- char_class_alpha=1<<5,
396
- char_class_digit=1<<6,
397
- char_class_punct=1<<7,
398
- char_class_xdigit=1<<8,
399
- char_class_alnum=char_class_alpha|char_class_digit,
400
- char_class_graph=char_class_alnum|char_class_punct,
401
- char_class_blank=1<<9,
402
- char_class_word=1<<10,
403
- char_class_unicode=1<<11,
404
- char_class_horizontal_space=1<<12,
405
- char_class_vertical_space=1<<13
406
- };
407
-
408
- #endif
409
-
410
- //
411
- // class cpp_regex_traits_implementation:
412
- // provides pimpl implementation for cpp_regex_traits.
413
- //
414
- template <class charT>
415
- class cpp_regex_traits_implementation : public cpp_regex_traits_char_layer<charT>
416
- {
417
- public:
418
- typedef typename cpp_regex_traits<charT>::char_class_type char_class_type;
419
- typedef typename std::ctype<charT>::mask native_mask_type;
420
- typedef typename boost::make_unsigned<native_mask_type>::type unsigned_native_mask_type;
421
- #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
422
- BOOST_STATIC_CONSTANT(char_class_type, mask_blank = 1u << 24);
423
- BOOST_STATIC_CONSTANT(char_class_type, mask_word = 1u << 25);
424
- BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 1u << 26);
425
- BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 1u << 27);
426
- BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 1u << 28);
427
- #endif
428
-
429
- typedef std::basic_string<charT> string_type;
430
- typedef charT char_type;
431
- //cpp_regex_traits_implementation();
432
- cpp_regex_traits_implementation(const std::locale& l)
433
- : cpp_regex_traits_char_layer<charT>(l)
434
- {
435
- init();
436
- }
437
- cpp_regex_traits_implementation(const cpp_regex_traits_base<charT>& l)
438
- : cpp_regex_traits_char_layer<charT>(l)
439
- {
440
- init();
441
- }
442
- std::string error_string(regex_constants::error_type n) const
443
- {
444
- if(!m_error_strings.empty())
445
- {
446
- std::map<int, std::string>::const_iterator p = m_error_strings.find(n);
447
- return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second;
448
- }
449
- return get_default_error_string(n);
450
- }
451
- char_class_type lookup_classname(const charT* p1, const charT* p2) const
452
- {
453
- char_class_type result = lookup_classname_imp(p1, p2);
454
- if(result == 0)
455
- {
456
- string_type temp(p1, p2);
457
- this->m_pctype->tolower(&*temp.begin(), &*temp.begin() + temp.size());
458
- result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size());
459
- }
460
- return result;
461
- }
462
- string_type lookup_collatename(const charT* p1, const charT* p2) const;
463
- string_type transform_primary(const charT* p1, const charT* p2) const;
464
- string_type transform(const charT* p1, const charT* p2) const;
465
- private:
466
- std::map<int, std::string> m_error_strings; // error messages indexed by numberic ID
467
- std::map<string_type, char_class_type> m_custom_class_names; // character class names
468
- std::map<string_type, string_type> m_custom_collate_names; // collating element names
469
- unsigned m_collate_type; // the form of the collation string
470
- charT m_collate_delim; // the collation group delimiter
471
- //
472
- // helpers:
473
- //
474
- char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const;
475
- void init();
476
- #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
477
- public:
478
- bool isctype(charT c, char_class_type m)const;
479
- #endif
480
- };
481
-
482
- #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
483
- #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
484
-
485
- template <class charT>
486
- typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_blank;
487
- template <class charT>
488
- typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_word;
489
- template <class charT>
490
- typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_unicode;
491
- template <class charT>
492
- typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_vertical;
493
- template <class charT>
494
- typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_horizontal;
495
-
496
- #endif
497
- #endif
498
-
499
- template <class charT>
500
- typename cpp_regex_traits_implementation<charT>::string_type
501
- cpp_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const
502
- {
503
- //
504
- // PRECONDITIONS:
505
- //
506
- // A bug in gcc 3.2 (and maybe other versions as well) treats
507
- // p1 as a null terminated string, for efficiency reasons
508
- // we work around this elsewhere, but just assert here that
509
- // we adhere to gcc's (buggy) preconditions...
510
- //
511
- BOOST_REGEX_ASSERT(*p2 == 0);
512
- string_type result;
513
- #if defined(_CPPLIB_VER)
514
- //
515
- // A bug in VC11 and 12 causes the program to hang if we pass a null-string
516
- // to std::collate::transform, but only for certain locales :-(
517
- // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware).
518
- //
519
- if(*p1 == 0)
520
- {
521
- return string_type(1, charT(0));
522
- }
523
- #endif
524
- //
525
- // swallowing all exceptions here is a bad idea
526
- // however at least one std lib will always throw
527
- // std::bad_alloc for certain arguments...
528
- //
529
- #ifndef BOOST_NO_EXCEPTIONS
530
- try{
531
- #endif
532
- //
533
- // What we do here depends upon the format of the sort key returned by
534
- // sort key returned by this->transform:
535
- //
536
- switch(m_collate_type)
537
- {
538
- case sort_C:
539
- case sort_unknown:
540
- // the best we can do is translate to lower case, then get a regular sort key:
541
- {
542
- result.assign(p1, p2);
543
- this->m_pctype->tolower(&*result.begin(), &*result.begin() + result.size());
544
- result = this->m_pcollate->transform(&*result.begin(), &*result.begin() + result.size());
545
- break;
546
- }
547
- case sort_fixed:
548
- {
549
- // get a regular sort key, and then truncate it:
550
- result.assign(this->m_pcollate->transform(p1, p2));
551
- result.erase(this->m_collate_delim);
552
- break;
553
- }
554
- case sort_delim:
555
- // get a regular sort key, and then truncate everything after the delim:
556
- result.assign(this->m_pcollate->transform(p1, p2));
557
- std::size_t i;
558
- for(i = 0; i < result.size(); ++i)
559
- {
560
- if(result[i] == m_collate_delim)
561
- break;
562
- }
563
- result.erase(i);
564
- break;
565
- }
566
- #ifndef BOOST_NO_EXCEPTIONS
567
- }catch(...){}
568
- #endif
569
- while((!result.empty()) && (charT(0) == *result.rbegin()))
570
- result.erase(result.size() - 1);
571
- if(result.empty())
572
- {
573
- // character is ignorable at the primary level:
574
- result = string_type(1, charT(0));
575
- }
576
- return result;
577
- }
578
-
579
- template <class charT>
580
- typename cpp_regex_traits_implementation<charT>::string_type
581
- cpp_regex_traits_implementation<charT>::transform(const charT* p1, const charT* p2) const
582
- {
583
- //
584
- // PRECONDITIONS:
585
- //
586
- // A bug in gcc 3.2 (and maybe other versions as well) treats
587
- // p1 as a null terminated string, for efficiency reasons
588
- // we work around this elsewhere, but just assert here that
589
- // we adhere to gcc's (buggy) preconditions...
590
- //
591
- BOOST_REGEX_ASSERT(*p2 == 0);
592
- //
593
- // swallowing all exceptions here is a bad idea
594
- // however at least one std lib will always throw
595
- // std::bad_alloc for certain arguments...
596
- //
597
- string_type result, result2;
598
- #if defined(_CPPLIB_VER)
599
- //
600
- // A bug in VC11 and 12 causes the program to hang if we pass a null-string
601
- // to std::collate::transform, but only for certain locales :-(
602
- // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware).
603
- //
604
- if(*p1 == 0)
605
- {
606
- return result;
607
- }
608
- #endif
609
- #ifndef BOOST_NO_EXCEPTIONS
610
- try{
611
- #endif
612
- result = this->m_pcollate->transform(p1, p2);
613
- //
614
- // Borland's STLPort version returns a NULL-terminated
615
- // string that has garbage at the end - each call to
616
- // std::collate<wchar_t>::transform returns a different string!
617
- // So as a workaround, we'll truncate the string at the first NULL
618
- // which _seems_ to work....
619
- #if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x580)
620
- result.erase(result.find(charT(0)));
621
- #else
622
- //
623
- // some implementations (Dinkumware) append unnecessary trailing \0's:
624
- while((!result.empty()) && (charT(0) == *result.rbegin()))
625
- result.erase(result.size() - 1);
626
- #endif
627
- //
628
- // We may have NULL's used as separators between sections of the collate string,
629
- // an example would be Boost.Locale. We have no way to detect this case via
630
- // #defines since this can be used with any compiler/platform combination.
631
- // Unfortunately our state machine (which was devised when all implementations
632
- // used underlying C language API's) can't cope with that case. One workaround
633
- // is to replace each character with 2, fortunately this code isn't used that
634
- // much as this is now slower than before :-(
635
- //
636
- typedef typename make_unsigned<charT>::type uchar_type;
637
- result2.reserve(result.size() * 2 + 2);
638
- for(unsigned i = 0; i < result.size(); ++i)
639
- {
640
- if(static_cast<uchar_type>(result[i]) == (std::numeric_limits<uchar_type>::max)())
641
- {
642
- result2.append(1, charT((std::numeric_limits<uchar_type>::max)())).append(1, charT('b'));
643
- }
644
- else
645
- {
646
- result2.append(1, static_cast<charT>(1 + static_cast<uchar_type>(result[i]))).append(1, charT('b') - 1);
647
- }
648
- }
649
- BOOST_REGEX_ASSERT(std::find(result2.begin(), result2.end(), charT(0)) == result2.end());
650
- #ifndef BOOST_NO_EXCEPTIONS
651
- }
652
- catch(...)
653
- {
654
- }
655
- #endif
656
- return result2;
657
- }
658
-
659
-
660
- template <class charT>
661
- typename cpp_regex_traits_implementation<charT>::string_type
662
- cpp_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const
663
- {
664
- typedef typename std::map<string_type, string_type>::const_iterator iter_type;
665
- if(!m_custom_collate_names.empty())
666
- {
667
- iter_type pos = m_custom_collate_names.find(string_type(p1, p2));
668
- if(pos != m_custom_collate_names.end())
669
- return pos->second;
670
- }
671
- #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
672
- && !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
673
- std::string name(p1, p2);
674
- #else
675
- std::string name;
676
- const charT* p0 = p1;
677
- while(p0 != p2)
678
- name.append(1, char(*p0++));
679
- #endif
680
- name = lookup_default_collate_name(name);
681
- #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
682
- && !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
683
- if(!name.empty())
684
- return string_type(name.begin(), name.end());
685
- #else
686
- if(!name.empty())
687
- {
688
- string_type result;
689
- typedef std::string::const_iterator iter;
690
- iter b = name.begin();
691
- iter e = name.end();
692
- while(b != e)
693
- result.append(1, charT(*b++));
694
- return result;
695
- }
696
- #endif
697
- if(p2 - p1 == 1)
698
- return string_type(1, *p1);
699
- return string_type();
700
- }
701
-
702
- template <class charT>
703
- void cpp_regex_traits_implementation<charT>::init()
704
- {
705
- #ifndef BOOST_NO_STD_MESSAGES
706
- #ifndef __IBMCPP__
707
- typename std::messages<charT>::catalog cat = static_cast<std::messages<char>::catalog>(-1);
708
- #else
709
- typename std::messages<charT>::catalog cat = reinterpret_cast<std::messages<char>::catalog>(-1);
710
- #endif
711
- std::string cat_name(cpp_regex_traits<charT>::get_catalog_name());
712
- if((!cat_name.empty()) && (this->m_pmessages != 0))
713
- {
714
- cat = this->m_pmessages->open(
715
- cat_name,
716
- this->m_locale);
717
- if((int)cat < 0)
718
- {
719
- std::string m("Unable to open message catalog: ");
720
- std::runtime_error err(m + cat_name);
721
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
722
- }
723
- }
724
- //
725
- // if we have a valid catalog then load our messages:
726
- //
727
- if((int)cat >= 0)
728
- {
729
- //
730
- // Error messages:
731
- //
732
- for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
733
- i <= boost::regex_constants::error_unknown;
734
- i = static_cast<boost::regex_constants::error_type>(i + 1))
735
- {
736
- const char* p = get_default_error_string(i);
737
- string_type default_message;
738
- while(*p)
739
- {
740
- default_message.append(1, this->m_pctype->widen(*p));
741
- ++p;
742
- }
743
- string_type s = this->m_pmessages->get(cat, 0, i+200, default_message);
744
- std::string result;
745
- for(std::string::size_type j = 0; j < s.size(); ++j)
746
- {
747
- result.append(1, this->m_pctype->narrow(s[j], 0));
748
- }
749
- m_error_strings[i] = result;
750
- }
751
- //
752
- // Custom class names:
753
- //
754
- #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
755
- static const char_class_type masks[16] =
756
- {
757
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::alnum),
758
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::alpha),
759
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::cntrl),
760
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::digit),
761
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::graph),
762
- cpp_regex_traits_implementation<charT>::mask_horizontal,
763
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::lower),
764
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::print),
765
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::punct),
766
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::space),
767
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::upper),
768
- cpp_regex_traits_implementation<charT>::mask_vertical,
769
- static_cast<unsigned_native_mask_type>(std::ctype<charT>::xdigit),
770
- cpp_regex_traits_implementation<charT>::mask_blank,
771
- cpp_regex_traits_implementation<charT>::mask_word,
772
- cpp_regex_traits_implementation<charT>::mask_unicode,
773
- };
774
- #else
775
- static const char_class_type masks[16] =
776
- {
777
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alnum,
778
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alpha,
779
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_cntrl,
780
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_digit,
781
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_graph,
782
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_horizontal_space,
783
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_lower,
784
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_print,
785
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_punct,
786
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_space,
787
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_upper,
788
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_vertical_space,
789
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_xdigit,
790
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_blank,
791
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_word,
792
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_unicode,
793
- };
794
- #endif
795
- static const string_type null_string;
796
- for(unsigned int j = 0; j <= 13; ++j)
797
- {
798
- string_type s(this->m_pmessages->get(cat, 0, j+300, null_string));
799
- if(!s.empty())
800
- this->m_custom_class_names[s] = masks[j];
801
- }
802
- }
803
- #endif
804
- //
805
- // get the collation format used by m_pcollate:
806
- //
807
- m_collate_type = BOOST_REGEX_DETAIL_NS::find_sort_syntax(this, &m_collate_delim);
808
- }
809
-
810
- template <class charT>
811
- typename cpp_regex_traits_implementation<charT>::char_class_type
812
- cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
813
- {
814
- #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
815
- static const char_class_type masks[22] =
816
- {
817
- 0,
818
- static_cast<unsigned_native_mask_type>(std::ctype<char>::alnum),
819
- static_cast<unsigned_native_mask_type>(std::ctype<char>::alpha),
820
- cpp_regex_traits_implementation<charT>::mask_blank,
821
- static_cast<unsigned_native_mask_type>(std::ctype<char>::cntrl),
822
- static_cast<unsigned_native_mask_type>(std::ctype<char>::digit),
823
- static_cast<unsigned_native_mask_type>(std::ctype<char>::digit),
824
- static_cast<unsigned_native_mask_type>(std::ctype<char>::graph),
825
- cpp_regex_traits_implementation<charT>::mask_horizontal,
826
- static_cast<unsigned_native_mask_type>(std::ctype<char>::lower),
827
- static_cast<unsigned_native_mask_type>(std::ctype<char>::lower),
828
- static_cast<unsigned_native_mask_type>(std::ctype<char>::print),
829
- static_cast<unsigned_native_mask_type>(std::ctype<char>::punct),
830
- static_cast<unsigned_native_mask_type>(std::ctype<char>::space),
831
- static_cast<unsigned_native_mask_type>(std::ctype<char>::space),
832
- static_cast<unsigned_native_mask_type>(std::ctype<char>::upper),
833
- cpp_regex_traits_implementation<charT>::mask_unicode,
834
- static_cast<unsigned_native_mask_type>(std::ctype<char>::upper),
835
- cpp_regex_traits_implementation<charT>::mask_vertical,
836
- static_cast<unsigned_native_mask_type>(std::ctype<char>::alnum) | cpp_regex_traits_implementation<charT>::mask_word,
837
- static_cast<unsigned_native_mask_type>(std::ctype<char>::alnum) | cpp_regex_traits_implementation<charT>::mask_word,
838
- static_cast<unsigned_native_mask_type>(std::ctype<char>::xdigit),
839
- };
840
- #else
841
- static const char_class_type masks[22] =
842
- {
843
- 0,
844
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alnum,
845
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alpha,
846
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_blank,
847
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_cntrl,
848
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_digit,
849
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_digit,
850
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_graph,
851
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_horizontal_space,
852
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_lower,
853
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_lower,
854
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_print,
855
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_punct,
856
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_space,
857
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_space,
858
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_upper,
859
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_unicode,
860
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_upper,
861
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_vertical_space,
862
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alnum | ::boost::BOOST_REGEX_DETAIL_NS::char_class_word,
863
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_alnum | ::boost::BOOST_REGEX_DETAIL_NS::char_class_word,
864
- ::boost::BOOST_REGEX_DETAIL_NS::char_class_xdigit,
865
- };
866
- #endif
867
- if(!m_custom_class_names.empty())
868
- {
869
- typedef typename std::map<std::basic_string<charT>, char_class_type>::const_iterator map_iter;
870
- map_iter pos = m_custom_class_names.find(string_type(p1, p2));
871
- if(pos != m_custom_class_names.end())
872
- return pos->second;
873
- }
874
- std::size_t state_id = 1 + BOOST_REGEX_DETAIL_NS::get_default_class_id(p1, p2);
875
- BOOST_REGEX_ASSERT(state_id < sizeof(masks) / sizeof(masks[0]));
876
- return masks[state_id];
877
- }
878
-
879
- #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
880
- template <class charT>
881
- bool cpp_regex_traits_implementation<charT>::isctype(const charT c, char_class_type mask) const
882
- {
883
- return
884
- ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_space) && (this->m_pctype->is(std::ctype<charT>::space, c)))
885
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_print) && (this->m_pctype->is(std::ctype<charT>::print, c)))
886
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_cntrl) && (this->m_pctype->is(std::ctype<charT>::cntrl, c)))
887
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_upper) && (this->m_pctype->is(std::ctype<charT>::upper, c)))
888
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_lower) && (this->m_pctype->is(std::ctype<charT>::lower, c)))
889
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_alpha) && (this->m_pctype->is(std::ctype<charT>::alpha, c)))
890
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_digit) && (this->m_pctype->is(std::ctype<charT>::digit, c)))
891
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_punct) && (this->m_pctype->is(std::ctype<charT>::punct, c)))
892
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_xdigit) && (this->m_pctype->is(std::ctype<charT>::xdigit, c)))
893
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_blank) && (this->m_pctype->is(std::ctype<charT>::space, c)) && !::boost::BOOST_REGEX_DETAIL_NS::is_separator(c))
894
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_word) && (c == '_'))
895
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_unicode) && ::boost::BOOST_REGEX_DETAIL_NS::is_extended(c))
896
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_vertical_space) && (is_separator(c) || (c == '\v')))
897
- || ((mask & ::boost::BOOST_REGEX_DETAIL_NS::char_class_horizontal_space) && this->m_pctype->is(std::ctype<charT>::space, c) && !(is_separator(c) || (c == '\v')));
898
- }
899
- #endif
900
-
901
-
902
- template <class charT>
903
- inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l)
904
- {
905
- cpp_regex_traits_base<charT> key(l);
906
- return ::boost::object_cache<cpp_regex_traits_base<charT>, cpp_regex_traits_implementation<charT> >::get(key, 5);
907
- }
908
-
909
- } // BOOST_REGEX_DETAIL_NS
910
-
911
- template <class charT>
912
- class cpp_regex_traits
913
- {
914
- private:
915
- typedef std::ctype<charT> ctype_type;
916
- public:
917
- typedef charT char_type;
918
- typedef std::size_t size_type;
919
- typedef std::basic_string<char_type> string_type;
920
- typedef std::locale locale_type;
921
- typedef boost::uint_least32_t char_class_type;
922
-
923
- struct boost_extensions_tag{};
924
-
925
- cpp_regex_traits()
926
- : m_pimpl(BOOST_REGEX_DETAIL_NS::create_cpp_regex_traits<charT>(std::locale()))
927
- { }
928
- static size_type length(const char_type* p)
929
- {
930
- return std::char_traits<charT>::length(p);
931
- }
932
- regex_constants::syntax_type syntax_type(charT c)const
933
- {
934
- return m_pimpl->syntax_type(c);
935
- }
936
- regex_constants::escape_syntax_type escape_syntax_type(charT c) const
937
- {
938
- return m_pimpl->escape_syntax_type(c);
939
- }
940
- charT translate(charT c) const
941
- {
942
- return c;
943
- }
944
- charT translate_nocase(charT c) const
945
- {
946
- return m_pimpl->m_pctype->tolower(c);
947
- }
948
- charT translate(charT c, bool icase) const
949
- {
950
- return icase ? m_pimpl->m_pctype->tolower(c) : c;
951
- }
952
- charT tolower(charT c) const
953
- {
954
- return m_pimpl->m_pctype->tolower(c);
955
- }
956
- charT toupper(charT c) const
957
- {
958
- return m_pimpl->m_pctype->toupper(c);
959
- }
960
- string_type transform(const charT* p1, const charT* p2) const
961
- {
962
- return m_pimpl->transform(p1, p2);
963
- }
964
- string_type transform_primary(const charT* p1, const charT* p2) const
965
- {
966
- return m_pimpl->transform_primary(p1, p2);
967
- }
968
- char_class_type lookup_classname(const charT* p1, const charT* p2) const
969
- {
970
- return m_pimpl->lookup_classname(p1, p2);
971
- }
972
- string_type lookup_collatename(const charT* p1, const charT* p2) const
973
- {
974
- return m_pimpl->lookup_collatename(p1, p2);
975
- }
976
- bool isctype(charT c, char_class_type f) const
977
- {
978
- #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
979
- typedef typename std::ctype<charT>::mask ctype_mask;
980
-
981
- static const ctype_mask mask_base =
982
- static_cast<ctype_mask>(
983
- std::ctype<charT>::alnum
984
- | std::ctype<charT>::alpha
985
- | std::ctype<charT>::cntrl
986
- | std::ctype<charT>::digit
987
- | std::ctype<charT>::graph
988
- | std::ctype<charT>::lower
989
- | std::ctype<charT>::print
990
- | std::ctype<charT>::punct
991
- | std::ctype<charT>::space
992
- | std::ctype<charT>::upper
993
- | std::ctype<charT>::xdigit);
994
-
995
- if((f & mask_base)
996
- && (m_pimpl->m_pctype->is(
997
- static_cast<ctype_mask>(f & mask_base), c)))
998
- return true;
999
- else if((f & BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_unicode) && BOOST_REGEX_DETAIL_NS::is_extended(c))
1000
- return true;
1001
- else if((f & BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_word) && (c == '_'))
1002
- return true;
1003
- else if((f & BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_blank)
1004
- && m_pimpl->m_pctype->is(std::ctype<charT>::space, c)
1005
- && !BOOST_REGEX_DETAIL_NS::is_separator(c))
1006
- return true;
1007
- else if((f & BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_vertical)
1008
- && (::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) || (c == '\v')))
1009
- return true;
1010
- else if((f & BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_horizontal)
1011
- && this->isctype(c, std::ctype<charT>::space) && !this->isctype(c, BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT>::mask_vertical))
1012
- return true;
1013
- #ifdef __CYGWIN__
1014
- //
1015
- // Cygwin has a buggy ctype facet, see https://www.cygwin.com/ml/cygwin/2012-08/msg00178.html:
1016
- //
1017
- else if((f & std::ctype<charT>::xdigit) == std::ctype<charT>::xdigit)
1018
- {
1019
- if((c >= 'a') && (c <= 'f'))
1020
- return true;
1021
- if((c >= 'A') && (c <= 'F'))
1022
- return true;
1023
- }
1024
- #endif
1025
- return false;
1026
- #else
1027
- return m_pimpl->isctype(c, f);
1028
- #endif
1029
- }
1030
- boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const;
1031
- int value(charT c, int radix)const
1032
- {
1033
- const charT* pc = &c;
1034
- return (int)toi(pc, pc + 1, radix);
1035
- }
1036
- locale_type imbue(locale_type l)
1037
- {
1038
- std::locale result(getloc());
1039
- m_pimpl = BOOST_REGEX_DETAIL_NS::create_cpp_regex_traits<charT>(l);
1040
- return result;
1041
- }
1042
- locale_type getloc()const
1043
- {
1044
- return m_pimpl->m_locale;
1045
- }
1046
- std::string error_string(regex_constants::error_type n) const
1047
- {
1048
- return m_pimpl->error_string(n);
1049
- }
1050
-
1051
- //
1052
- // extension:
1053
- // set the name of the message catalog in use (defaults to "boost_regex").
1054
- //
1055
- static std::string catalog_name(const std::string& name);
1056
- static std::string get_catalog_name();
1057
-
1058
- private:
1059
- boost::shared_ptr<const BOOST_REGEX_DETAIL_NS::cpp_regex_traits_implementation<charT> > m_pimpl;
1060
- //
1061
- // catalog name handler:
1062
- //
1063
- static std::string& get_catalog_name_inst();
1064
-
1065
- #ifdef BOOST_HAS_THREADS
1066
- static static_mutex& get_mutex_inst();
1067
- #endif
1068
- };
1069
-
1070
-
1071
- template <class charT>
1072
- boost::intmax_t cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
1073
- {
1074
- BOOST_REGEX_DETAIL_NS::parser_buf<charT> sbuf; // buffer for parsing numbers.
1075
- std::basic_istream<charT> is(&sbuf); // stream for parsing numbers.
1076
-
1077
- // we do NOT want to parse any thousands separators inside the stream:
1078
- last = std::find(first, last, BOOST_USE_FACET(std::numpunct<charT>, is.getloc()).thousands_sep());
1079
-
1080
- sbuf.pubsetbuf(const_cast<charT*>(static_cast<const charT*>(first)), static_cast<std::streamsize>(last-first));
1081
- is.clear();
1082
- if(std::abs(radix) == 16) is >> std::hex;
1083
- else if(std::abs(radix) == 8) is >> std::oct;
1084
- else is >> std::dec;
1085
- boost::intmax_t val;
1086
- if(is >> val)
1087
- {
1088
- first = first + ((last - first) - sbuf.in_avail());
1089
- return val;
1090
- }
1091
- else
1092
- return -1;
1093
- }
1094
-
1095
- template <class charT>
1096
- std::string cpp_regex_traits<charT>::catalog_name(const std::string& name)
1097
- {
1098
- #ifdef BOOST_HAS_THREADS
1099
- static_mutex::scoped_lock lk(get_mutex_inst());
1100
- #endif
1101
- std::string result(get_catalog_name_inst());
1102
- get_catalog_name_inst() = name;
1103
- return result;
1104
- }
1105
-
1106
- template <class charT>
1107
- std::string& cpp_regex_traits<charT>::get_catalog_name_inst()
1108
- {
1109
- static std::string s_name;
1110
- return s_name;
1111
- }
1112
-
1113
- template <class charT>
1114
- std::string cpp_regex_traits<charT>::get_catalog_name()
1115
- {
1116
- #ifdef BOOST_HAS_THREADS
1117
- static_mutex::scoped_lock lk(get_mutex_inst());
1118
- #endif
1119
- std::string result(get_catalog_name_inst());
1120
- return result;
1121
- }
1122
-
1123
- #ifdef BOOST_HAS_THREADS
1124
- template <class charT>
1125
- static_mutex& cpp_regex_traits<charT>::get_mutex_inst()
1126
- {
1127
- static static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT;
1128
- return s_mutex;
1129
- }
1130
- #endif
1131
-
1132
- namespace BOOST_REGEX_DETAIL_NS {
1133
-
1134
- inline void cpp_regex_traits_char_layer<char>::init()
1135
- {
1136
- // we need to start by initialising our syntax map so we know which
1137
- // character is used for which purpose:
1138
- std::memset(m_char_map, 0, sizeof(m_char_map));
1139
- #ifndef BOOST_NO_STD_MESSAGES
1140
- #ifndef __IBMCPP__
1141
- std::messages<char>::catalog cat = static_cast<std::messages<char>::catalog>(-1);
1142
- #else
1143
- std::messages<char>::catalog cat = reinterpret_cast<std::messages<char>::catalog>(-1);
1144
- #endif
1145
- std::string cat_name(cpp_regex_traits<char>::get_catalog_name());
1146
- if ((!cat_name.empty()) && (m_pmessages != 0))
1147
- {
1148
- cat = this->m_pmessages->open(
1149
- cat_name,
1150
- this->m_locale);
1151
- if ((int)cat < 0)
1152
- {
1153
- std::string m("Unable to open message catalog: ");
1154
- std::runtime_error err(m + cat_name);
1155
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
1156
- }
1157
- }
1158
- //
1159
- // if we have a valid catalog then load our messages:
1160
- //
1161
- if ((int)cat >= 0)
1162
- {
1163
- #ifndef BOOST_NO_EXCEPTIONS
1164
- try {
1165
- #endif
1166
- for (regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
1167
- {
1168
- string_type mss = this->m_pmessages->get(cat, 0, i, get_default_syntax(i));
1169
- for (string_type::size_type j = 0; j < mss.size(); ++j)
1170
- {
1171
- m_char_map[static_cast<unsigned char>(mss[j])] = i;
1172
- }
1173
- }
1174
- this->m_pmessages->close(cat);
1175
- #ifndef BOOST_NO_EXCEPTIONS
1176
- }
1177
- catch (...)
1178
- {
1179
- this->m_pmessages->close(cat);
1180
- throw;
1181
- }
1182
- #endif
1183
- }
1184
- else
1185
- {
1186
- #endif
1187
- for (regex_constants::syntax_type j = 1; j < regex_constants::syntax_max; ++j)
1188
- {
1189
- const char* ptr = get_default_syntax(j);
1190
- while (ptr && *ptr)
1191
- {
1192
- m_char_map[static_cast<unsigned char>(*ptr)] = j;
1193
- ++ptr;
1194
- }
1195
- }
1196
- #ifndef BOOST_NO_STD_MESSAGES
1197
- }
1198
- #endif
1199
- //
1200
- // finish off by calculating our escape types:
1201
- //
1202
- unsigned char i = 'A';
1203
- do
1204
- {
1205
- if (m_char_map[i] == 0)
1206
- {
1207
- if (this->m_pctype->is(std::ctype_base::lower, i))
1208
- m_char_map[i] = regex_constants::escape_type_class;
1209
- else if (this->m_pctype->is(std::ctype_base::upper, i))
1210
- m_char_map[i] = regex_constants::escape_type_not_class;
1211
- }
1212
- } while (0xFF != i++);
1213
- }
1214
-
1215
- } // namespace detail
1216
-
1217
-
1218
- } // boost
1219
-
1220
- #ifdef BOOST_MSVC
1221
- #pragma warning(pop)
1222
- #endif
1223
-
1224
- #ifdef BOOST_MSVC
1225
- #pragma warning(push)
1226
- #pragma warning(disable: 4103)
1227
- #endif
1228
- #ifdef BOOST_HAS_ABI_HEADERS
1229
- # include BOOST_ABI_SUFFIX
1230
- #endif
1231
- #ifdef BOOST_MSVC
1232
- #pragma warning(pop)
1233
- #endif
1234
-
1235
- #endif
1236
-
1237
- #endif