passenger 5.1.4 → 5.1.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (542) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +9 -0
  3. data/CHANGELOG +9 -0
  4. data/build/cxx_tests.rb +11 -1
  5. data/build/documentation.rb +0 -32
  6. data/build/support/cxx_dependency_map.rb +602 -2
  7. data/build/test_basics.rb +3 -3
  8. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +48 -0
  9. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +33 -0
  10. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +25 -0
  11. data/dev/ci/README.md +121 -0
  12. data/dev/ci/lib/functions.sh +129 -0
  13. data/dev/ci/lib/set-container-envvars.sh +46 -0
  14. data/dev/ci/lib/setup-container.sh +43 -0
  15. data/dev/ci/run-tests-natively +24 -0
  16. data/dev/ci/run-tests-with-docker +42 -0
  17. data/dev/ci/scripts/debug-console-wrapper.sh +27 -0
  18. data/dev/ci/scripts/docker-entrypoint-stage2.sh +17 -0
  19. data/dev/ci/scripts/docker-entrypoint.sh +17 -0
  20. data/dev/ci/scripts/inituidgid +17 -0
  21. data/dev/ci/scripts/run-tests-natively-stage2.sh +17 -0
  22. data/dev/ci/scripts/setup-host-natively.sh +11 -0
  23. data/dev/ci/setup-host +50 -0
  24. data/dev/ci/tests/apache2/run +6 -0
  25. data/dev/ci/tests/apache2/setup +4 -0
  26. data/dev/ci/tests/cxx/run +9 -0
  27. data/dev/ci/tests/cxx/setup +4 -0
  28. data/dev/ci/tests/nginx-dynamic/run +20 -0
  29. data/dev/ci/tests/nginx-dynamic/setup +4 -0
  30. data/dev/ci/tests/nginx/run +5 -0
  31. data/dev/ci/tests/nginx/setup +4 -0
  32. data/dev/ci/tests/nodejs/run +4 -0
  33. data/dev/ci/tests/nodejs/setup +4 -0
  34. data/dev/ci/tests/ruby/run +4 -0
  35. data/dev/ci/tests/ruby/setup +4 -0
  36. data/dev/ci/tests/source-packaging/run +4 -0
  37. data/dev/ci/tests/source-packaging/setup +4 -0
  38. data/dev/ci/tests/standalone/run +4 -0
  39. data/dev/ci/tests/standalone/setup +4 -0
  40. data/dev/copy_boost_headers +8 -2
  41. data/src/agent/Core/ApiServer.h +11 -5
  42. data/src/agent/Core/Controller.h +12 -46
  43. data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
  44. data/src/agent/Core/Controller/Config.h +369 -0
  45. data/src/agent/Core/Controller/ForwardResponse.cpp +4 -4
  46. data/src/agent/Core/Controller/Hooks.cpp +15 -3
  47. data/src/agent/Core/Controller/Implementation.cpp +1 -1
  48. data/src/agent/Core/Controller/InitRequest.cpp +28 -39
  49. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +25 -60
  50. data/src/agent/Core/Controller/InternalUtils.cpp +0 -16
  51. data/src/agent/Core/Controller/Miscellaneous.cpp +0 -17
  52. data/src/agent/Core/Controller/Request.h +2 -0
  53. data/src/agent/Core/Controller/SendRequest.cpp +4 -4
  54. data/src/agent/Core/Controller/{StateInspectionAndConfiguration.cpp → StateInspection.cpp} +0 -22
  55. data/src/agent/Core/Controller/TurboCaching.h +11 -10
  56. data/src/agent/Core/CoreMain.cpp +16 -6
  57. data/src/agent/Core/ResponseCache.h +3 -3
  58. data/src/agent/Core/SpawningKit/SmartSpawner.h +9 -3
  59. data/src/agent/Core/SpawningKit/Spawner.h +7 -3
  60. data/src/agent/UstRouter/ApiServer.h +3 -2
  61. data/src/agent/UstRouter/Controller.h +66 -32
  62. data/src/agent/UstRouter/UstRouterMain.cpp +10 -2
  63. data/src/agent/Watchdog/ApiServer.h +3 -2
  64. data/src/agent/Watchdog/WatchdogMain.cpp +3 -1
  65. data/src/apache2_module/ConfigurationCommands.cpp +1 -1
  66. data/src/cxx_supportlib/ConfigKit/Common.h +125 -0
  67. data/src/cxx_supportlib/ConfigKit/ConfigKit.h +34 -0
  68. data/src/cxx_supportlib/ConfigKit/README.md +895 -0
  69. data/src/cxx_supportlib/ConfigKit/Schema.h +331 -0
  70. data/src/cxx_supportlib/ConfigKit/Store.h +385 -0
  71. data/src/cxx_supportlib/ConfigKit/TableTranslator.h +185 -0
  72. data/src/cxx_supportlib/ConfigKit/Utils.h +141 -0
  73. data/src/cxx_supportlib/ConfigKit/VariantMapUtils.h +81 -0
  74. data/src/cxx_supportlib/Constants.h +1 -1
  75. data/src/cxx_supportlib/Crypto.cpp +2 -2
  76. data/src/cxx_supportlib/Logging.h +0 -35
  77. data/src/cxx_supportlib/ServerKit/HttpServer.h +35 -16
  78. data/src/cxx_supportlib/ServerKit/Server.h +65 -25
  79. data/src/cxx_supportlib/oxt/macros.hpp +3 -0
  80. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +0 -2
  81. data/src/cxx_supportlib/vendor-modified/boost/array.hpp +53 -42
  82. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +11 -5
  83. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +13 -2
  84. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +23 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +5 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +3 -2
  87. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +8 -1
  88. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +3 -1
  89. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +2 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +2 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +5 -0
  92. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +2 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +6 -4
  94. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +2 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +3 -1
  96. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +28 -17
  97. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +2 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +2 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +9 -4
  100. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +3 -3
  101. data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +10 -3
  102. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +90 -18
  103. data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +2 -2
  104. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
  105. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +8 -3
  106. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +2 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +35 -6
  108. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +2 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/comeau.hpp +1 -1
  110. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +2 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/compaq_cxx.hpp +1 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +3 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +2 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +19 -4
  115. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +3 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/greenhills.hpp +1 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +3 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +29 -7
  119. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/kai.hpp +1 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +2 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +2 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +16 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +2 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +2 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sgi_mipspro.hpp +1 -1
  126. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +10 -1
  127. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +2 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +44 -16
  129. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
  130. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +1 -2
  131. data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +1 -1
  132. data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +21 -21
  133. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +42 -1
  134. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +7 -0
  135. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +40 -7
  136. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +39 -6
  137. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +7 -0
  138. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +7 -0
  139. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +7 -0
  140. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +8 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +7 -0
  142. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +7 -0
  143. data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +33 -4
  144. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +0 -2
  145. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +0 -3
  146. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -27
  147. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +62 -26
  148. data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +2 -2
  149. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +4 -4
  150. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +4 -4
  151. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +2 -0
  152. data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +39 -5
  153. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +49 -32
  154. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +175 -7
  155. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +223 -98
  156. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_sorted.hpp +57 -0
  157. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +88 -41
  158. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +7 -8
  159. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +4 -9
  160. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +45 -18
  161. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +205 -26
  162. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +290 -181
  163. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +2 -0
  164. data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +24 -19
  165. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +38 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +320 -46
  167. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +91 -18
  168. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -19
  169. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +491 -120
  170. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +4 -4
  171. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +0 -3
  172. data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +399 -0
  173. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +2 -0
  174. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +4 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +4 -0
  176. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +2 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +4 -0
  178. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +4 -0
  179. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +2 -0
  180. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +2 -0
  181. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +2 -0
  182. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +2 -0
  183. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +2 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +101 -20
  185. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +19 -14
  186. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +117 -59
  187. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -6
  188. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +33 -28
  189. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +414 -70
  190. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +1 -0
  191. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +2 -2
  192. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +134 -117
  193. data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +202 -99
  194. data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +8 -10
  195. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +217 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +29 -27
  197. data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +5 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +13 -13
  199. data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +3 -3
  200. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +2 -1
  201. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +4 -3
  202. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +6 -5
  203. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +2 -2
  204. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +8 -7
  205. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +2 -1
  206. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +2 -1
  207. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +4 -3
  208. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +3 -2
  209. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +2 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +4 -3
  211. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +27 -7
  212. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +5 -5
  213. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +5 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +4 -4
  215. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +4 -5
  216. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +2 -1
  217. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +5 -4
  218. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +4 -3
  219. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +3 -2
  220. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +2 -2
  222. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +5 -4
  223. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +6 -5
  224. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +4 -0
  225. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +2 -2
  226. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +5 -4
  227. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +2 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +3 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +13 -0
  230. data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +1 -0
  231. data/src/cxx_supportlib/vendor-modified/boost/detail/workaround.hpp +5 -0
  232. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +11 -0
  233. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/shared_ptr.hpp +17 -0
  234. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +25 -3
  235. data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +2 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +114 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +116 -142
  238. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +57 -69
  239. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +3 -3
  241. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +27 -13
  242. data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +4 -2
  243. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +99 -12
  244. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +4 -2
  245. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +35 -4
  246. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +37 -6
  247. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +95 -8
  248. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +4 -2
  249. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +209 -72
  250. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +86 -20
  251. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +11 -11
  252. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +6 -6
  253. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +4 -1
  254. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +58 -45
  255. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +27 -26
  256. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +2 -2
  257. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +7 -7
  258. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +8 -3
  259. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +4 -3
  260. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +27 -26
  261. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +3 -1
  262. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +4 -2
  263. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +9 -7
  264. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +83 -57
  265. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +30 -30
  266. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +9 -8
  267. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +8 -7
  268. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -15
  269. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +70 -44
  270. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +22 -21
  271. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +7 -6
  272. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +5 -4
  273. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +29 -28
  274. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +33 -12
  275. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +19 -12
  276. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +21 -20
  277. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +4 -3
  278. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +3 -2
  279. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +23 -22
  280. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +23 -22
  281. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +10 -9
  282. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +103 -29
  283. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +15 -0
  284. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +295 -211
  285. data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +2 -2
  286. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +20 -7
  287. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +4 -2
  288. data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +5 -4
  289. data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +4 -4
  290. data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +3 -2
  291. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +4 -4
  292. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +4 -4
  293. data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +22 -4
  294. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +36 -4
  295. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +43 -13
  296. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +95 -8
  297. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +4 -2
  298. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +96 -12
  299. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +102 -5
  300. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +48 -4
  301. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +20 -11
  302. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +9 -2
  303. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +95 -8
  304. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +36 -4
  305. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +27 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +167 -23
  307. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +28 -0
  308. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +100 -46
  309. data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +5 -4
  310. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +37 -27
  311. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +30 -14
  312. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +35 -36
  314. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +6 -28
  315. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +20 -5
  316. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +4 -2
  317. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -1
  318. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +5 -0
  319. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +11 -7
  320. data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +1 -3
  321. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +5 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +11 -0
  323. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +10 -2
  324. data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +40 -7
  325. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +67 -0
  326. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +63 -0
  327. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +2437 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +121 -0
  329. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/insertion_sort.hpp +127 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +637 -0
  331. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +139 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +155 -0
  333. data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +1 -116
  334. data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +14 -13
  335. data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +17 -1
  336. data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +2 -0
  337. data/src/cxx_supportlib/vendor-modified/boost/move/detail/destruct_n.hpp +67 -0
  338. data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +227 -32
  339. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +4 -0
  340. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +30 -9
  341. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +12 -0
  342. data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +84 -80
  343. data/src/cxx_supportlib/vendor-modified/boost/move/detail/placement_new.hpp +30 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/move/detail/reverse_iterator.hpp +171 -0
  345. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +14 -20
  346. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
  347. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +14 -0
  348. data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +32 -33
  349. data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +2 -1
  350. data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +49 -49
  351. data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +8 -7
  352. data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +17 -16
  353. data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +3 -0
  354. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +1 -1
  355. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +2 -3
  356. data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +197 -255
  357. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +1059 -0
  358. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +75 -0
  359. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +116 -0
  360. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +36 -0
  361. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +253 -0
  362. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +196 -0
  363. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +117 -0
  364. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +372 -554
  365. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +12 -1
  366. data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +15 -7
  367. data/src/cxx_supportlib/vendor-modified/boost/pool/pool_alloc.hpp +24 -0
  368. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +9 -2
  369. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +15 -1
  370. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +16 -4
  371. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +3 -3
  372. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +4 -4
  373. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +4 -4
  374. data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +1 -1
  375. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +2 -2
  376. data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +20 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/cat.hpp +1 -1
  378. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +6 -6
  379. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +5 -6
  380. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/to_list_msvc.hpp +55 -0
  381. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/to_list.hpp +12 -0
  382. data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +4 -4
  383. data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +0 -5
  384. data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +16 -16
  385. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +4 -4
  386. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +3 -0
  387. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +102 -87
  388. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +45 -21
  389. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +4 -4
  390. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +2 -2
  391. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +1 -1
  392. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +14 -2
  393. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +46 -0
  394. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +5 -2
  395. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +5 -14
  396. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +116 -13
  397. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +34 -0
  398. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +2 -2
  399. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +1 -1
  400. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +3 -3
  401. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +1 -0
  402. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +2 -2
  403. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1004 -159
  404. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +9 -0
  405. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +3 -0
  406. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +4 -58
  407. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +5 -2
  408. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +9 -0
  409. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -8
  410. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync.hpp +3 -3
  411. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +30 -0
  412. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +3 -0
  413. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +5 -4
  414. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +28 -3
  415. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +187 -0
  416. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +52 -144
  417. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +120 -450
  418. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +2 -1
  419. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +2 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +7 -6
  421. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +70 -8
  422. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +6 -5
  423. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +9 -8
  424. data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +3 -3
  425. data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +5 -4
  426. data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +0 -1
  427. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +0 -11
  428. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +6 -4
  429. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +11 -2
  430. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +11 -4
  431. data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +8 -8
  432. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +1 -1
  433. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +5 -5
  434. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +22 -18
  435. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +163 -55
  436. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +1 -0
  437. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +1 -1
  438. data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +9 -9
  439. data/src/cxx_supportlib/vendor-modified/boost/thread/locks.hpp +1 -0
  440. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +6 -7
  441. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +17 -2
  442. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +2 -2
  443. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +5 -5
  444. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/timespec.hpp +29 -0
  445. data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +23 -18
  446. data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +6 -6
  447. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp +19 -4
  448. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_guard.hpp +3 -3
  449. data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +1 -1
  450. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +265 -0
  451. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +272 -0
  452. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +300 -0
  453. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +3 -3
  454. data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +6 -6
  455. data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +1 -0
  456. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +9 -3
  457. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +3 -3
  458. data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +1 -0
  459. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +2 -1
  460. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +2 -1
  461. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +1 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +2 -1
  463. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +1 -0
  464. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +1 -1
  465. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +1 -0
  466. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +1 -0
  467. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +1 -0
  468. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +1 -1
  469. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +1 -0
  470. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +2 -1
  471. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +21 -1
  472. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +1 -0
  473. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +1 -1
  474. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +2 -1
  475. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +1 -0
  476. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +1 -1
  477. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +1 -1
  478. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +2 -1
  479. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_void.hpp +52 -0
  480. data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +1 -0
  481. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +1 -1
  482. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +1 -1
  483. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +1 -1
  484. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +1 -1
  485. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +1 -1
  486. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +1 -1
  487. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +1 -1
  488. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +40 -6
  489. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +4986 -0
  490. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +107 -0
  491. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +105 -0
  492. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +1814 -1255
  493. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +41 -45
  494. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +1498 -1161
  495. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +40 -44
  496. data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +2 -2
  497. data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +7 -6
  498. data/src/cxx_supportlib/vendor-modified/boost/utility/compare_pointees.hpp +10 -2
  499. data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +39 -22
  500. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +690 -0
  501. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view_fwd.hpp +39 -0
  502. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  503. data/src/helper-scripts/crash-watch.rb +3 -0
  504. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  505. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -0
  506. data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -12
  507. metadata +77 -38
  508. data/dev/ci/inituidgid +0 -24
  509. data/dev/ci/run_jenkins.sh +0 -70
  510. data/dev/ci/run_travis.sh +0 -314
  511. data/doc/Design and Architecture.html +0 -2421
  512. data/doc/Design and Architecture.txt +0 -511
  513. data/doc/Security of user switching support.html +0 -1833
  514. data/doc/Users guide Apache.html +0 -3101
  515. data/doc/Users guide Apache.idmap.txt +0 -451
  516. data/doc/Users guide Apache.txt +0 -534
  517. data/doc/Users guide Nginx.html +0 -3026
  518. data/doc/Users guide Nginx.idmap.txt +0 -431
  519. data/doc/Users guide Nginx.txt +0 -451
  520. data/doc/Users guide Standalone.html +0 -2092
  521. data/doc/Users guide Standalone.idmap.txt +0 -137
  522. data/doc/Users guide Standalone.txt +0 -81
  523. data/doc/Users guide.html +0 -1606
  524. data/doc/Users guide.txt +0 -8
  525. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -20
  526. data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +0 -29
  527. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +0 -40
  528. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -22
  529. data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -29
  530. data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -383
  531. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +0 -318
  532. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +0 -67
  533. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +0 -60
  534. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +0 -214
  535. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +0 -34
  536. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +0 -1128
  537. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +0 -928
  538. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +0 -686
  539. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +0 -188
  540. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +0 -873
  541. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +0 -628
  542. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +0 -266
@@ -37,16 +37,19 @@
37
37
  #include <boost/container/detail/next_capacity.hpp>
38
38
  #include <boost/container/detail/to_raw_pointer.hpp>
39
39
  #include <boost/container/detail/version_type.hpp>
40
+ #include <boost/container/detail/type_traits.hpp>
41
+ #include <boost/container/detail/minimal_char_traits_header.hpp>
42
+
43
+ #include <boost/intrusive/pointer_traits.hpp>
40
44
 
41
45
  #include <boost/move/utility_core.hpp>
42
46
  #include <boost/move/adl_move_swap.hpp>
47
+ #include <boost/move/traits.hpp>
48
+
43
49
  #include <boost/static_assert.hpp>
44
- #include <boost/intrusive/pointer_traits.hpp>
45
50
  #include <boost/core/no_exceptions_support.hpp>
46
- #include <boost/container/detail/minimal_char_traits_header.hpp>
47
51
  #include <boost/functional/hash.hpp>
48
52
 
49
-
50
53
  #include <algorithm>
51
54
  #include <functional> //bind2nd, etc.
52
55
  #include <iosfwd>
@@ -56,8 +59,12 @@
56
59
  #include <locale>
57
60
  #include <cstddef>
58
61
  #include <climits>
59
- #include <boost/container/detail/type_traits.hpp>
60
- #include <boost/move/traits.hpp>
62
+
63
+ //std
64
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
65
+ #include <initializer_list> //for std::initializer_list
66
+ #endif
67
+
61
68
 
62
69
  namespace boost {
63
70
  namespace container {
@@ -230,7 +237,14 @@ class basic_string_base
230
237
 
231
238
  protected:
232
239
  bool is_short() const
233
- { return static_cast<bool>(this->members_.m_repr.s.h.is_short != 0); }
240
+ {
241
+ //Access and copy (to avoid UB) the first byte of the union to know if the
242
+ //active representation is short or long
243
+ short_header hdr;
244
+ BOOST_STATIC_ASSERT((sizeof(short_header) == 1));
245
+ *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr;
246
+ return hdr.is_short != 0;
247
+ }
234
248
 
235
249
  void is_short(bool yes)
236
250
  {
@@ -584,7 +598,7 @@ class basic_string
584
598
  //! <b>Effects</b>: Default constructs a basic_string.
585
599
  //!
586
600
  //! <b>Throws</b>: If allocator_type's default constructor throws.
587
- basic_string()
601
+ basic_string() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
588
602
  : base_t()
589
603
  { this->priv_terminate_string(); }
590
604
 
@@ -608,6 +622,17 @@ class basic_string
608
622
  this->assign(s.begin(), s.end());
609
623
  }
610
624
 
625
+ //! <b>Effects</b>: Same as basic_string(sv.data(), sv.size(), a).
626
+ //!
627
+ //! <b>Throws</b>: If allocator_type's default constructor or allocation throws.
628
+ template<template <class, class> class BasicStringView>
629
+ explicit basic_string(BasicStringView<CharT, Traits> sv, const Allocator& a = Allocator())
630
+ : base_t(allocator_traits_type::select_on_container_copy_construction(a))
631
+ {
632
+ this->priv_terminate_string();
633
+ this->assign(sv);
634
+ }
635
+
611
636
  //! <b>Effects</b>: Move constructor. Moves s's resources to *this.
612
637
  //!
613
638
  //! <b>Throws</b>: Nothing.
@@ -773,6 +798,17 @@ class basic_string
773
798
  this->assign(f, l);
774
799
  }
775
800
 
801
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
802
+ //! <b>Effects</b>: Same as basic_string(il.begin(), il.end(), a).
803
+ //!
804
+ basic_string(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
805
+ : base_t(a)
806
+ {
807
+ this->priv_terminate_string();
808
+ this->assign(il.begin(), il.end());
809
+ }
810
+ #endif
811
+
776
812
  //! <b>Effects</b>: Destroys the basic_string. All used memory is deallocated.
777
813
  //!
778
814
  //! <b>Throws</b>: Nothing.
@@ -845,13 +881,30 @@ class basic_string
845
881
  }
846
882
 
847
883
  //! <b>Effects</b>: Assignment from a null-terminated c-string.
884
+ //!
848
885
  basic_string& operator=(const CharT* s)
849
886
  { return this->assign(s, s + Traits::length(s)); }
850
887
 
851
- //! <b>Effects</b>: Assignment from character.
888
+ //! <b>Effects</b>: Returns *this = basic_string(1, c).
889
+ //!
852
890
  basic_string& operator=(CharT c)
853
891
  { return this->assign(static_cast<size_type>(1), c); }
854
892
 
893
+ //! <b>Effects</b>: Equivalent to return assign(sv).
894
+ //!
895
+ template<template <class, class> class BasicStringView>
896
+ basic_string& operator=(BasicStringView<CharT, Traits> sv)
897
+ { return this->assign(sv.data(), sv.size()); }
898
+
899
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
900
+ //! <b>Effects</b>: Returns *this = basic_string(il);
901
+ //!
902
+ basic_string& operator=(std::initializer_list<CharT> il)
903
+ {
904
+ return this->assign(il.begin(), il.end());
905
+ }
906
+ #endif
907
+
855
908
  //! <b>Effects</b>: Returns a copy of the internal allocator.
856
909
  //!
857
910
  //! <b>Throws</b>: If allocator's copy constructor throws.
@@ -1249,6 +1302,14 @@ class basic_string
1249
1302
  basic_string& operator+=(const basic_string& s)
1250
1303
  { return this->append(s); }
1251
1304
 
1305
+ //! <b>Effects</b>: Same as `return append(sv)`.
1306
+ //!
1307
+ template<template<class, class> class BasicStringView>
1308
+ basic_string& operator+=(BasicStringView<CharT, Traits> sv)
1309
+ {
1310
+ return this->append(sv);
1311
+ }
1312
+
1252
1313
  //! <b>Effects</b>: Calls append(s).
1253
1314
  //!
1254
1315
  //! <b>Returns</b>: *this
@@ -1261,12 +1322,27 @@ class basic_string
1261
1322
  basic_string& operator+=(CharT c)
1262
1323
  { this->push_back(c); return *this; }
1263
1324
 
1325
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1326
+ //! <b>Effects</b>: Returns append(il)
1327
+ //!
1328
+ basic_string& operator+=(std::initializer_list<CharT> il)
1329
+ {
1330
+ return this->append(il);
1331
+ }
1332
+ #endif
1333
+
1264
1334
  //! <b>Effects</b>: Calls append(str.data(), str.size()).
1265
1335
  //!
1266
1336
  //! <b>Returns</b>: *this
1267
1337
  basic_string& append(const basic_string& s)
1268
1338
  { return this->append(s.begin(), s.end()); }
1269
1339
 
1340
+ //! <b>Effects</b>: Same as return append(sv.data(), sv.size()).
1341
+ //!
1342
+ template<template<class, class> class BasicStringView>
1343
+ basic_string& append(BasicStringView<CharT, Traits> sv)
1344
+ { return this->append(sv.data(), sv.size()); }
1345
+
1270
1346
  //! <b>Requires</b>: pos <= str.size()
1271
1347
  //!
1272
1348
  //! <b>Effects</b>: Determines the effective length rlen of the string to append
@@ -1275,7 +1351,7 @@ class basic_string
1275
1351
  //! <b>Throws</b>: If memory allocation throws and out_of_range if pos > str.size()
1276
1352
  //!
1277
1353
  //! <b>Returns</b>: *this
1278
- basic_string& append(const basic_string& s, size_type pos, size_type n)
1354
+ basic_string& append(const basic_string& s, size_type pos, size_type n = npos)
1279
1355
  {
1280
1356
  if (pos > s.size())
1281
1357
  throw_out_of_range("basic_string::append out of range position");
@@ -1319,7 +1395,17 @@ class basic_string
1319
1395
  basic_string& append(InputIter first, InputIter last)
1320
1396
  { this->insert(this->end(), first, last); return *this; }
1321
1397
 
1398
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1399
+ //! <b>Effects</b>: Returns append(il.begin(), il.size()).
1400
+ //!
1401
+ basic_string& append(std::initializer_list<CharT> il)
1402
+ {
1403
+ return this->append(il.begin(), il.size());
1404
+ }
1405
+ #endif
1406
+
1322
1407
  //! <b>Effects</b>: Equivalent to append(static_cast<size_type>(1), c).
1408
+ //!
1323
1409
  void push_back(CharT c)
1324
1410
  {
1325
1411
  const size_type old_size = this->priv_size();
@@ -1341,6 +1427,13 @@ class basic_string
1341
1427
  basic_string& assign(const basic_string& s)
1342
1428
  { return this->operator=(s); }
1343
1429
 
1430
+ //! <b>Effects</b>: Equivalent to return assign(sv.data(), sv.size()).
1431
+ //!
1432
+ //! <b>Returns</b>: *this
1433
+ template<template <class, class> class BasicStringView>
1434
+ basic_string& assign(BasicStringView<CharT, Traits> sv)
1435
+ { return this->operator=(sv); }
1436
+
1344
1437
  //! <b>Effects</b>: The function replaces the string controlled by *this
1345
1438
  //! with a string of length str.size() whose elements are a copy of the string
1346
1439
  //! controlled by str. Leaves str in a valid but unspecified state.
@@ -1433,6 +1526,15 @@ class basic_string
1433
1526
  return *this;
1434
1527
  }
1435
1528
 
1529
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1530
+ //! <b>Effects</b>: Returns assign(il.begin(), il.size()).
1531
+ //!
1532
+ basic_string& assign(std::initializer_list<CharT> il)
1533
+ {
1534
+ return this->assign(il.begin(), il.size());
1535
+ }
1536
+ #endif
1537
+
1436
1538
  //! <b>Requires</b>: pos <= size().
1437
1539
  //!
1438
1540
  //! <b>Effects</b>: Calls insert(pos, str.data(), str.size()).
@@ -1459,7 +1561,7 @@ class basic_string
1459
1561
  //! <b>Throws</b>: If memory allocation throws or out_of_range if pos1 > size() or pos2 > str.size().
1460
1562
  //!
1461
1563
  //! <b>Returns</b>: *this
1462
- basic_string& insert(size_type pos1, const basic_string& s, size_type pos2, size_type n)
1564
+ basic_string& insert(size_type pos1, const basic_string& s, size_type pos2, size_type n = npos)
1463
1565
  {
1464
1566
  const size_type sz = this->size();
1465
1567
  const size_type str_size = s.size();
@@ -1530,6 +1632,12 @@ class basic_string
1530
1632
  return *this;
1531
1633
  }
1532
1634
 
1635
+ //! <b>Effects</b>: Same as `return insert(pos, sv.data(), sv.size())`.
1636
+ //!
1637
+ template<template<class, class> class BasicStringView>
1638
+ basic_string& insert(size_type pos, BasicStringView<CharT, Traits> sv)
1639
+ { return this->insert(pos, sv.data(), sv.size()); }
1640
+
1533
1641
  //! <b>Requires</b>: p is a valid iterator on *this.
1534
1642
  //!
1535
1643
  //! <b>Effects</b>: inserts a copy of c before the character referred to by p.
@@ -1542,7 +1650,6 @@ class basic_string
1542
1650
  return this->priv_addr() + new_offset;
1543
1651
  }
1544
1652
 
1545
-
1546
1653
  //! <b>Requires</b>: p is a valid iterator on *this.
1547
1654
  //!
1548
1655
  //! <b>Effects</b>: Inserts n copies of c before the character referred to by p.
@@ -1688,6 +1795,17 @@ class basic_string
1688
1795
  }
1689
1796
  #endif
1690
1797
 
1798
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1799
+ //! <b>Effects</b>: As if by insert(p, il.begin(), il.end()).
1800
+ //!
1801
+ //! <b>Returns</b>: An iterator which refers to the copy of the first inserted
1802
+ //! character, or p if i1 is empty.
1803
+ iterator insert(const_iterator p, std::initializer_list<CharT> il)
1804
+ {
1805
+ return this->insert(p, il.begin(), il.end());
1806
+ }
1807
+ #endif
1808
+
1691
1809
  //! <b>Effects</b>: Removes the last element from the container.
1692
1810
  //!
1693
1811
  //! <b>Throws</b>: Nothing.
@@ -1794,6 +1912,14 @@ class basic_string
1794
1912
  , str.begin(), str.end());
1795
1913
  }
1796
1914
 
1915
+ //! <b>Effects</b>: Calls `return replace(pos1, n1, sv.data(), sv.size());`.
1916
+ //!
1917
+ template<template<class, class> class BasicStringView>
1918
+ basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv)
1919
+ {
1920
+ return this->replace(pos1, n1, sv.data(), sv.size());
1921
+ }
1922
+
1797
1923
  //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size().
1798
1924
  //!
1799
1925
  //! <b>Effects</b>: Determines the effective length rlen of the string to be
@@ -1804,18 +1930,26 @@ class basic_string
1804
1930
  //!
1805
1931
  //! <b>Returns</b>: *this
1806
1932
  basic_string& replace(size_type pos1, size_type n1,
1807
- const basic_string& str, size_type pos2, size_type n2)
1933
+ const basic_string& str, size_type pos2, size_type n2 = npos)
1808
1934
  {
1809
- if (pos1 > this->size() || pos2 > str.size())
1935
+ if (pos2 > str.size())
1810
1936
  throw_out_of_range("basic_string::replace out of range position");
1811
- const size_type len1 = container_detail::min_value(n1, this->size() - pos1);
1812
- const size_type len2 = container_detail::min_value(n2, str.size() - pos2);
1813
- if (this->size() - len1 >= this->max_size() - len2)
1814
- throw_length_error("basic_string::replace max_size() exceeded");
1815
- const pointer addr = this->priv_addr();
1816
- const pointer straddr = str.priv_addr();
1817
- return this->replace(addr + pos1, addr + pos1 + len1,
1818
- straddr + pos2, straddr + pos2 + len2);
1937
+ return this->replace(pos1, n1, str.data()+pos2, container_detail::min_value(n2, str.size() - pos2));
1938
+ }
1939
+
1940
+ //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size().
1941
+ //!
1942
+ //! <b>Effects</b>: Determines the effective length rlen of the string to be inserted as the
1943
+ //! smaller of n2 and sv.size() - pos2 and calls `replace(pos1, n1, sv.data() + pos2, rlen)`.
1944
+ //!
1945
+ //! <b>Returns</b>: *this.
1946
+ template<template<class, class> class BasicStringView>
1947
+ basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv,
1948
+ size_type pos2, size_type n2 = npos)
1949
+ {
1950
+ if (pos2 > sv.size())
1951
+ throw_out_of_range("basic_string::replace out of range position");
1952
+ return this->replace(pos1, n1, sv.data()+pos2, container_detail::min_value(n2, sv.size() - pos2));
1819
1953
  }
1820
1954
 
1821
1955
  //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
@@ -1829,7 +1963,7 @@ class basic_string
1829
1963
  //! the original string controlled by *this beginning at position pos + xlen.
1830
1964
  //!
1831
1965
  //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
1832
- //! if the length of the resulting string would exceed max_size()
1966
+ //! if the length of the resulting string would exceed max_size()
1833
1967
  //!
1834
1968
  //! <b>Returns</b>: *this
1835
1969
  basic_string& replace(size_type pos1, size_type n1, const CharT* s, size_type n2)
@@ -1837,10 +1971,11 @@ class basic_string
1837
1971
  if (pos1 > this->size())
1838
1972
  throw_out_of_range("basic_string::replace out of range position");
1839
1973
  const size_type len = container_detail::min_value(n1, this->size() - pos1);
1840
- if (n2 > this->max_size() || size() - len >= this->max_size() - n2)
1974
+ const size_type max_size = this->max_size();
1975
+ if (n2 > max_size || (this->size() - len) >= (max_size - n2))
1841
1976
  throw_length_error("basic_string::replace max_size() exceeded");
1842
- const pointer addr = this->priv_addr();
1843
- return this->replace(addr + pos1, addr + pos1 + len, s, s + n2);
1977
+ const pointer addr = this->priv_addr() + pos1;
1978
+ return this->replace(addr, addr + len, s, s + n2);
1844
1979
  }
1845
1980
 
1846
1981
  //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
@@ -1859,15 +1994,7 @@ class basic_string
1859
1994
  //! <b>Returns</b>: *this
1860
1995
  basic_string& replace(size_type pos, size_type n1, const CharT* s)
1861
1996
  {
1862
- if (pos > this->size())
1863
- throw_out_of_range("basic_string::replace out of range position");
1864
- const size_type len = container_detail::min_value(n1, this->size() - pos);
1865
- const size_type n2 = Traits::length(s);
1866
- if (n2 > this->max_size() || this->size() - len >= this->max_size() - n2)
1867
- throw_length_error("basic_string::replace max_size() exceeded");
1868
- const pointer addr = this->priv_addr();
1869
- return this->replace(addr + pos, addr + pos + len,
1870
- s, s + Traits::length(s));
1997
+ return this->replace(pos, n1, s, Traits::length(s));
1871
1998
  }
1872
1999
 
1873
2000
  //! <b>Requires</b>: pos1 <= size().
@@ -1897,7 +2024,7 @@ class basic_string
1897
2024
  //!
1898
2025
  //! <b>Returns</b>: *this
1899
2026
  basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str)
1900
- { return this->replace(i1, i2, str.begin(), str.end()); }
2027
+ { return this->replace(i1, i2, str.data(), str.data()+str.size()); }
1901
2028
 
1902
2029
  //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges and
1903
2030
  //! s points to an array of at least n elements
@@ -1997,6 +2124,32 @@ class basic_string
1997
2124
  }
1998
2125
  #endif
1999
2126
 
2127
+ //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
2128
+ //!
2129
+ //! <b>Effects</b>: Calls `replace(i1 - begin(), i2 - i1, sv).`.
2130
+ //!
2131
+ //! <bReturns</b>: *this.
2132
+ template<template <class, class> class BasicStringView>
2133
+ basic_string& replace(const_iterator i1, const_iterator i2, BasicStringView<CharT, Traits> sv)
2134
+ {
2135
+ return this->replace( static_cast<size_type>(i1 - this->cbegin())
2136
+ , static_cast<size_type>(i2 - i1), sv);
2137
+ }
2138
+
2139
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
2140
+ //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
2141
+ //!
2142
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, il.begin(), il.size()).
2143
+ //!
2144
+ //! <bReturns</b>: *this.
2145
+ basic_string& replace(const_iterator i1, const_iterator i2, std::initializer_list<CharT> il)
2146
+ {
2147
+ return this->replace( static_cast<size_type>(i1 - this->cbegin())
2148
+ , static_cast<size_type>(i2 - i1)
2149
+ , il.begin(), il.size());
2150
+ }
2151
+ #endif
2152
+
2000
2153
  //! <b>Requires</b>: pos <= size()
2001
2154
  //!
2002
2155
  //! <b>Effects</b>: Determines the effective length rlen of the string to copy as the
@@ -2052,6 +2205,31 @@ class basic_string
2052
2205
  const CharT* data() const BOOST_NOEXCEPT_OR_NOTHROW
2053
2206
  { return container_detail::to_raw_pointer(this->priv_addr()); }
2054
2207
 
2208
+ //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
2209
+ //!
2210
+ //! <b>Complexity</b>: constant time.
2211
+ CharT* data() BOOST_NOEXCEPT_OR_NOTHROW
2212
+ { return container_detail::to_raw_pointer(this->priv_addr()); }
2213
+
2214
+ #ifndef BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
2215
+ //! <b>Returns</b>: a string_view to the characters in the string.
2216
+ //!
2217
+ //! <b>Complexity</b>: constant time.
2218
+ template<template <class, class> class BasicStringView>
2219
+ operator BasicStringView<CharT, Traits>() const BOOST_NOEXCEPT_OR_NOTHROW
2220
+ { return this->to_view< BasicStringView<CharT, Traits> >(); }
2221
+ #endif
2222
+
2223
+ //! <b>Returns</b>: a string_view to the characters in the string.
2224
+ //!
2225
+ //! <b>Complexity</b>: constant time.
2226
+ //!
2227
+ //! <b>Note</b>: This function is available to write portable code for compilers
2228
+ //! that don't support templated conversion operators.
2229
+ template<class BasicStringView>
2230
+ BasicStringView to_view() const BOOST_NOEXCEPT_OR_NOTHROW
2231
+ { return BasicStringView(this->data(), this->size()); }
2232
+
2055
2233
  //////////////////////////////////////////////
2056
2234
  //
2057
2235
  // string operations
@@ -2059,7 +2237,8 @@ class basic_string
2059
2237
  //////////////////////////////////////////////
2060
2238
 
2061
2239
  //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
2062
- //! of the following conditions obtain: 19 pos <= xpos and xpos + str.size() <= size();
2240
+ //! of the following conditions hold:
2241
+ //! 1) pos <= xpos and xpos + str.size() <= size();
2063
2242
  //! 2) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.
2064
2243
  //!
2065
2244
  //! <b>Throws</b>: Nothing
@@ -2068,6 +2247,18 @@ class basic_string
2068
2247
  size_type find(const basic_string& s, size_type pos = 0) const
2069
2248
  { return find(s.c_str(), pos, s.size()); }
2070
2249
 
2250
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
2251
+ //! of the following conditions hold:
2252
+ //! 1) pos <= xpos and xpos + sv.size() <= size();
2253
+ //! 2) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
2254
+ //!
2255
+ //! <b>Throws</b>: Nothing
2256
+ //!
2257
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2258
+ template<template <class, class> class BasicStringView>
2259
+ size_type find(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
2260
+ { return find(sv.data(), pos, sv.size()); }
2261
+
2071
2262
  //! <b>Requires</b>: s points to an array of at least n elements of CharT.
2072
2263
  //!
2073
2264
  //! <b>Throws</b>: Nothing
@@ -2125,6 +2316,18 @@ class basic_string
2125
2316
  size_type rfind(const basic_string& str, size_type pos = npos) const
2126
2317
  { return rfind(str.c_str(), pos, str.size()); }
2127
2318
 
2319
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such
2320
+ //! that both of the following conditions obtain:
2321
+ //! a) xpos <= pos and xpos + sv.size() <= size();
2322
+ //! b) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
2323
+ //!
2324
+ //! <b>Throws</b>: Nothing
2325
+ //!
2326
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2327
+ template<template <class, class> class BasicStringView>
2328
+ size_type rfind(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
2329
+ { return rfind(sv.data(), pos, sv.size()); }
2330
+
2128
2331
  //! <b>Requires</b>: s points to an array of at least n elements of CharT.
2129
2332
  //!
2130
2333
  //! <b>Throws</b>: Nothing
@@ -2181,8 +2384,19 @@ class basic_string
2181
2384
  //! <b>Throws</b>: Nothing
2182
2385
  //!
2183
2386
  //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2184
- size_type find_first_of(const basic_string& s, size_type pos = 0) const
2185
- { return find_first_of(s.c_str(), pos, s.size()); }
2387
+ size_type find_first_of(const basic_string& str, size_type pos = 0) const
2388
+ { return find_first_of(str.c_str(), pos, str.size()); }
2389
+
2390
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
2391
+ //! following conditions obtain: a) pos <= xpos and xpos < size();
2392
+ //! b) traits::eq(at(xpos), sv.at(I)) for some element I of the string controlled by sv.
2393
+ //!
2394
+ //! <b>Throws</b>: Nothing
2395
+ //!
2396
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2397
+ template<template <class, class> class BasicStringView>
2398
+ size_type find_first_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
2399
+ { return find_first_of(sv.data(), pos, sv.size()); }
2186
2400
 
2187
2401
  //! <b>Requires</b>: s points to an array of at least n elements of CharT.
2188
2402
  //!
@@ -2229,6 +2443,17 @@ class basic_string
2229
2443
  size_type find_last_of(const basic_string& str, size_type pos = npos) const
2230
2444
  { return find_last_of(str.c_str(), pos, str.size()); }
2231
2445
 
2446
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
2447
+ //! the following conditions obtain: a) xpos <= pos and xpos < size(); b)
2448
+ //! traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
2449
+ //!
2450
+ //! <b>Throws</b>: Nothing
2451
+ //!
2452
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2453
+ template<template <class, class> class BasicStringView>
2454
+ size_type find_last_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
2455
+ { return find_last_of(sv.data(), pos, sv.size()); }
2456
+
2232
2457
  //! <b>Requires</b>: s points to an array of at least n elements of CharT.
2233
2458
  //!
2234
2459
  //! <b>Throws</b>: Nothing
@@ -2275,6 +2500,18 @@ class basic_string
2275
2500
  size_type find_first_not_of(const basic_string& str, size_type pos = 0) const
2276
2501
  { return find_first_not_of(str.c_str(), pos, str.size()); }
2277
2502
 
2503
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
2504
+ //! both of the following conditions obtain:
2505
+ //! a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for no
2506
+ //! element I of the string controlled by sv.
2507
+ //!
2508
+ //! <b>Throws</b>: Nothing
2509
+ //!
2510
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2511
+ template<template <class, class> class BasicStringView>
2512
+ size_type find_first_not_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
2513
+ { return find_first_not_of(sv.data(), pos, sv.size()); }
2514
+
2278
2515
  //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
2279
2516
  //!
2280
2517
  //! <b>Throws</b>: Nothing
@@ -2328,6 +2565,17 @@ class basic_string
2328
2565
  size_type find_last_not_of(const basic_string& str, size_type pos = npos) const
2329
2566
  { return find_last_not_of(str.c_str(), pos, str.size()); }
2330
2567
 
2568
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that
2569
+ //! both of the following conditions obtain: a) xpos <= pos and xpos < size();
2570
+ //! b) traits::eq(at(xpos), sv.at(I)) for no element I of the string controlled by sv.
2571
+ //!
2572
+ //! <b>Throws</b>: Nothing
2573
+ //!
2574
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
2575
+ template<template <class, class> class BasicStringView>
2576
+ size_type find_last_not_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
2577
+ { return find_last_not_of(sv.data(), pos, sv.size()); }
2578
+
2331
2579
  //! <b>Requires</b>: s points to an array of at least n elements of CharT.
2332
2580
  //!
2333
2581
  //! <b>Throws</b>: Nothing
@@ -2391,7 +2639,7 @@ class basic_string
2391
2639
  addr + pos + container_detail::min_value(n, size() - pos), this->alloc());
2392
2640
  }
2393
2641
 
2394
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
2642
+ //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
2395
2643
  //! the smaller of size() and str.size(). The function then compares the two strings by
2396
2644
  //! calling traits::compare(data(), str.data(), rlen).
2397
2645
  //!
@@ -2407,10 +2655,21 @@ class basic_string
2407
2655
  return s_compare(addr, addr + this->priv_size(), str_addr, str_addr + str.priv_size());
2408
2656
  }
2409
2657
 
2658
+ //! <b>Throws</b>: Nothing
2659
+ //!
2660
+ //! <b>Returns</b>: compare(basic_string(sv)).
2661
+ template<template <class, class> class BasicStringView>
2662
+ int compare(BasicStringView<CharT,Traits> sv) const
2663
+ {
2664
+ const pointer addr = this->priv_addr();
2665
+ return s_compare(addr, addr + this->priv_size(), sv.data(), sv.data() + sv.size());
2666
+ }
2667
+
2410
2668
  //! <b>Requires</b>: pos1 <= size()
2411
2669
  //!
2412
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
2413
- //! the smaller of
2670
+ //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
2671
+ //! the smaller of (this->size() - pos1), n1 and str.size(). The function then compares the two strings by
2672
+ //! calling traits::compare(data()+pos1, str.data(), rlen).
2414
2673
  //!
2415
2674
  //! <b>Throws</b>: out_of_range if pos1 > size()
2416
2675
  //!
@@ -2426,6 +2685,22 @@ class basic_string
2426
2685
  str_addr, str_addr + str.priv_size());
2427
2686
  }
2428
2687
 
2688
+ //! <b>Requires</b>: pos1 <= size()
2689
+ //!
2690
+ //! <b>Throws</b>: out_of_range if pos1 > size()
2691
+ //!
2692
+ //! <b>Returns</b>:basic_string(*this,pos1,n1).compare(sv).
2693
+ template<template <class, class> class BasicStringView>
2694
+ int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv) const
2695
+ {
2696
+ if (pos1 > this->size())
2697
+ throw_out_of_range("basic_string::compare out of range position");
2698
+ const pointer addr = this->priv_addr() + pos1;
2699
+ const CharT* str_addr = sv.data();
2700
+ return s_compare(addr, addr + container_detail::min_value(n1, this->size() - pos1),
2701
+ str_addr, str_addr + sv.size());
2702
+ }
2703
+
2429
2704
  //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
2430
2705
  //!
2431
2706
  //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
@@ -2434,16 +2709,33 @@ class basic_string
2434
2709
  //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > str.size()
2435
2710
  //!
2436
2711
  //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)).
2437
- int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2) const
2712
+ int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const
2438
2713
  {
2439
2714
  if (pos1 > this->size() || pos2 > str.size())
2440
2715
  throw_out_of_range("basic_string::compare out of range position");
2441
- const pointer addr = this->priv_addr();
2442
- const pointer str_addr = str.priv_addr();
2443
- return s_compare(addr + pos1,
2444
- addr + pos1 + container_detail::min_value(n1, this->size() - pos1),
2445
- str_addr + pos2,
2446
- str_addr + pos2 + container_detail::min_value(n2, str.size() - pos2));
2716
+ const pointer addr = this->priv_addr() + pos1;
2717
+ const pointer str_addr = str.priv_addr() + pos2;
2718
+ return s_compare(addr, addr + container_detail::min_value(n1, this->size() - pos1),
2719
+ str_addr, str_addr + container_detail::min_value(n2, str.size() - pos2));
2720
+ }
2721
+
2722
+ //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
2723
+ //!
2724
+ //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
2725
+ //! the smaller of
2726
+ //!
2727
+ //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size()
2728
+ //!
2729
+ //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)).
2730
+ template<template <class, class> class BasicStringView>
2731
+ int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv, size_type pos2, size_type n2) const
2732
+ {
2733
+ if (pos1 > this->size() || pos2 > sv.size())
2734
+ throw_out_of_range("basic_string::compare out of range position");
2735
+ const pointer addr = this->priv_addr() + pos1;
2736
+ const CharT * str_addr = sv.data() + pos2;
2737
+ return s_compare(addr, addr + container_detail::min_value(n1, this->size() - pos1),
2738
+ str_addr, str_addr + container_detail::min_value(n2, sv.size() - pos2));
2447
2739
  }
2448
2740
 
2449
2741
  //! <b>Throws</b>: Nothing
@@ -2455,7 +2747,6 @@ class basic_string
2455
2747
  return s_compare(addr, addr + this->priv_size(), s, s + Traits::length(s));
2456
2748
  }
2457
2749
 
2458
-
2459
2750
  //! <b>Requires</b>: pos1 > size() and s points to an array of at least n2 elements of CharT.
2460
2751
  //!
2461
2752
  //! <b>Throws</b>: out_of_range if pos1 > size()
@@ -2508,8 +2799,8 @@ class basic_string
2508
2799
  }
2509
2800
  }
2510
2801
 
2511
- static int s_compare(const_pointer f1, const_pointer l1,
2512
- const_pointer f2, const_pointer l2)
2802
+ template<class It1, class It2>
2803
+ static int s_compare(It1 f1, It1 l1, It2 f2, It2 l2)
2513
2804
  {
2514
2805
  const difference_type n1 = l1 - f1;
2515
2806
  const difference_type n2 = l2 - f2;
@@ -2746,8 +3037,7 @@ template <class CharT, class Traits, class Allocator> inline
2746
3037
 
2747
3038
  template <class CharT, class Traits, class Allocator>
2748
3039
  inline bool
2749
- operator==(const basic_string<CharT,Traits,Allocator>& x,
2750
- const basic_string<CharT,Traits,Allocator>& y)
3040
+ operator==(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
2751
3041
  {
2752
3042
  return x.size() == y.size() &&
2753
3043
  Traits::compare(x.data(), y.data(), x.size()) == 0;
@@ -2769,10 +3059,25 @@ operator==(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2769
3059
  return x.size() == n && Traits::compare(x.data(), s, n) == 0;
2770
3060
  }
2771
3061
 
3062
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3063
+ inline bool
3064
+ operator==( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3065
+ {
3066
+ return x.size() == y.size() &&
3067
+ Traits::compare(x.data(), y.data(), x.size()) == 0;
3068
+ }
3069
+
3070
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3071
+ inline bool
3072
+ operator==( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3073
+ {
3074
+ return x.size() == y.size() &&
3075
+ Traits::compare(x.data(), y.data(), x.size()) == 0;
3076
+ }
3077
+
2772
3078
  template <class CharT, class Traits, class Allocator>
2773
3079
  inline bool
2774
- operator!=(const basic_string<CharT,Traits,Allocator>& x,
2775
- const basic_string<CharT,Traits,Allocator>& y)
3080
+ operator!=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
2776
3081
  { return !(x == y); }
2777
3082
 
2778
3083
  template <class CharT, class Traits, class Allocator>
@@ -2786,15 +3091,22 @@ operator!=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2786
3091
  { return !(x == s); }
2787
3092
 
2788
3093
 
2789
- // Operator< (and also >, <=, and >=).
3094
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3095
+ inline bool
3096
+ operator!=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3097
+ { return !(x == y); }
3098
+
3099
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3100
+ inline bool
3101
+ operator!=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3102
+ { return !(x == y); }
2790
3103
 
3104
+ // Operator< (and also >, <=, and >=).
2791
3105
  template <class CharT, class Traits, class Allocator>
2792
3106
  inline bool
2793
3107
  operator<(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
2794
3108
  {
2795
3109
  return x.compare(y) < 0;
2796
- // return basic_string<CharT,Traits,Allocator>
2797
- // ::s_compare(x.begin(), x.end(), y.begin(), y.end()) < 0;
2798
3110
  }
2799
3111
 
2800
3112
  template <class CharT, class Traits, class Allocator>
@@ -2802,26 +3114,28 @@ inline bool
2802
3114
  operator<(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
2803
3115
  {
2804
3116
  return y.compare(s) > 0;
2805
- // basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
2806
- // return basic_string<CharT,Traits,Allocator>
2807
- // ::s_compare(s, s + n, y.begin(), y.end()) < 0;
2808
3117
  }
2809
3118
 
2810
3119
  template <class CharT, class Traits, class Allocator>
2811
3120
  inline bool
2812
- operator<(const basic_string<CharT,Traits,Allocator>& x,
2813
- const CharT* s)
3121
+ operator<(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2814
3122
  {
2815
3123
  return x.compare(s) < 0;
2816
- // basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
2817
- // return basic_string<CharT,Traits,Allocator>
2818
- // ::s_compare(x.begin(), x.end(), s, s + n) < 0;
2819
3124
  }
2820
3125
 
3126
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3127
+ inline bool
3128
+ operator<( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3129
+ { return y.compare(x) > 0; }
3130
+
3131
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3132
+ inline bool
3133
+ operator<( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3134
+ { return x.compare(y) < 0; }
3135
+
2821
3136
  template <class CharT, class Traits, class Allocator>
2822
3137
  inline bool
2823
- operator>(const basic_string<CharT,Traits,Allocator>& x,
2824
- const basic_string<CharT,Traits,Allocator>& y) {
3138
+ operator>(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y) {
2825
3139
  return y < x;
2826
3140
  }
2827
3141
 
@@ -2838,10 +3152,19 @@ operator>(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2838
3152
  return s < x;
2839
3153
  }
2840
3154
 
3155
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3156
+ inline bool
3157
+ operator>( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3158
+ { return y < x; }
3159
+
3160
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3161
+ inline bool
3162
+ operator>( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3163
+ { return y < x; }
3164
+
2841
3165
  template <class CharT, class Traits, class Allocator>
2842
3166
  inline bool
2843
- operator<=(const basic_string<CharT,Traits,Allocator>& x,
2844
- const basic_string<CharT,Traits,Allocator>& y)
3167
+ operator<=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
2845
3168
  {
2846
3169
  return !(y < x);
2847
3170
  }
@@ -2856,6 +3179,17 @@ inline bool
2856
3179
  operator<=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2857
3180
  { return !(s < x); }
2858
3181
 
3182
+
3183
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3184
+ inline bool
3185
+ operator<=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3186
+ { return !(y < x); }
3187
+
3188
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3189
+ inline bool
3190
+ operator<=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3191
+ { return !(y < x); }
3192
+
2859
3193
  template <class CharT, class Traits, class Allocator>
2860
3194
  inline bool
2861
3195
  operator>=(const basic_string<CharT,Traits,Allocator>& x,
@@ -2872,6 +3206,16 @@ inline bool
2872
3206
  operator>=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
2873
3207
  { return !(x < s); }
2874
3208
 
3209
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3210
+ inline bool
3211
+ operator>=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
3212
+ { return !(x < y); }
3213
+
3214
+ template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
3215
+ inline bool
3216
+ operator>=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
3217
+ { return !(x < y); }
3218
+
2875
3219
  // Swap.
2876
3220
  template <class CharT, class Traits, class Allocator>
2877
3221
  inline void swap(basic_string<CharT,Traits,Allocator>& x, basic_string<CharT,Traits,Allocator>& y)