passenger 6.0.27 → 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 (482) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +42 -2
  3. data/CONTRIBUTORS +2 -0
  4. data/Rakefile +6 -13
  5. data/bin/passenger-install-apache2-module +21 -22
  6. data/bin/passenger-install-nginx-module +50 -47
  7. data/bin/passenger-status +9 -10
  8. data/build/common_library.rb +4 -4
  9. data/build/support/cxx_dependency_map.rb +3 -621
  10. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
  11. data/build/test_basics.rb +4 -3
  12. data/dev/copy_boost_headers +54 -40
  13. data/dev/index_cxx_dependencies.rb +4 -0
  14. data/dev/ruby_server.rb +1 -1
  15. data/package.json +1 -1
  16. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
  17. data/src/agent/Core/ApplicationPool/Socket.h +3 -3
  18. data/src/agent/Core/ApplicationPool/TestSession.h +3 -4
  19. data/src/agent/Core/Config.h +1 -6
  20. data/src/agent/Core/Controller/Config.h +1 -1
  21. data/src/agent/Core/CoreMain.cpp +1 -0
  22. data/src/agent/Core/SecurityUpdateChecker.h +10 -1
  23. data/src/agent/Core/SpawningKit/Exceptions.h +0 -1
  24. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  25. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +23 -5
  26. data/src/agent/Shared/Fundamentals/AbortHandler.h +10 -22
  27. data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -0
  28. data/src/agent/Watchdog/Config.h +1 -1
  29. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
  30. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  31. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +14 -0
  32. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +3 -0
  33. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
  34. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +11 -0
  35. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  36. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +17 -0
  37. data/src/apache2_module/Hooks.cpp +0 -6
  38. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +2 -12
  39. data/src/cxx_supportlib/ConfigKit/Store.h +1 -6
  40. data/src/cxx_supportlib/Constants.h +1 -1
  41. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -7
  42. data/src/cxx_supportlib/Exceptions.cpp +178 -0
  43. data/src/cxx_supportlib/Exceptions.h +62 -177
  44. data/src/cxx_supportlib/IOTools/IOUtils.cpp +255 -228
  45. data/src/cxx_supportlib/IOTools/IOUtils.h +84 -121
  46. data/src/cxx_supportlib/ServerKit/Config.h +1 -6
  47. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  48. data/src/cxx_supportlib/StaticString.h +1 -6
  49. data/src/cxx_supportlib/Utils/Curl.h +1 -6
  50. data/src/cxx_supportlib/Utils/ScopeGuard.h +0 -32
  51. data/src/cxx_supportlib/oxt/implementation.cpp +2 -2
  52. data/src/cxx_supportlib/oxt/spin_lock.hpp +94 -23
  53. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +8 -1
  54. data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +6 -0
  55. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +94 -110
  56. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_flag.hpp +2 -2
  57. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_ref.hpp +14 -14
  58. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/addressof.hpp +3 -3
  59. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag_impl.hpp +52 -24
  60. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_impl.hpp +641 -285
  61. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +593 -260
  62. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +37 -24
  63. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_fp_cast.hpp +9 -9
  64. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas_based_exchange.hpp +3 -3
  65. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/chrono.hpp +93 -0
  66. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/classify.hpp +16 -17
  67. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +25 -34
  68. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp +204 -97
  69. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp +251 -122
  70. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_alpha.hpp +56 -56
  71. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_arm.hpp +129 -129
  72. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_ppc.hpp +253 -125
  73. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_sparc.hpp +25 -25
  74. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +193 -126
  75. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_arm.hpp +57 -57
  76. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +96 -97
  77. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_emulated.hpp +24 -24
  78. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_cas_based.hpp +10 -10
  79. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_gcc_atomic.hpp +27 -24
  80. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_gcc_sync.hpp +39 -37
  81. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_linux_arm.hpp +17 -17
  82. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extending_cas_based_arithmetic.hpp +5 -5
  83. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_emulated.hpp +12 -12
  84. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_generic.hpp +21 -21
  85. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_emulated.hpp +30 -30
  86. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch32.hpp +170 -98
  87. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_aarch64.hpp +209 -119
  88. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_arm.hpp +95 -95
  89. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_ppc.hpp +148 -76
  90. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_x86.hpp +293 -123
  91. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_generic.hpp +87 -71
  92. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_arm.hpp +5 -5
  93. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_x86.hpp +88 -88
  94. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_operations.hpp +2 -2
  95. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp +4 -5
  96. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_aarch64.hpp +4 -4
  97. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_alpha.hpp +4 -4
  98. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp +9 -9
  99. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_ppc.hpp +4 -4
  100. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_sparc.hpp +4 -4
  101. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp +4 -4
  102. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_arm.hpp +5 -5
  103. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp +6 -6
  104. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations.hpp +2 -2
  105. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_operations_emulated.hpp +2 -2
  106. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_atomic.hpp +5 -5
  107. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_gcc_sync.hpp +4 -4
  108. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_linux_arm.hpp +7 -7
  109. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_emulated.hpp +7 -7
  110. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_generic.hpp +6 -6
  111. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/futex.hpp +110 -49
  112. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp +1 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/has_posix_clock_traits.hpp +51 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +26 -32
  115. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/integral_conversions.hpp +15 -15
  116. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +69 -30
  117. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/intptr.hpp +8 -8
  118. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lock_pool.hpp +51 -31
  119. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/memory_order_utils.hpp +2 -2
  120. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/once_flag.hpp +2 -2
  121. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm_common.hpp +6 -6
  122. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc_common.hpp +4 -4
  123. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +5 -5
  124. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_traits.hpp +31 -31
  125. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/alignment_of.hpp +2 -3
  126. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/has_unique_object_representations.hpp +2 -5
  127. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_floating_point.hpp +3 -3
  128. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_iec559.hpp +2 -2
  129. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_integral.hpp +3 -3
  130. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_signed.hpp +3 -3
  131. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_copyable.hpp +20 -13
  132. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp +13 -13
  133. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_signed.hpp +3 -3
  134. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_unsigned.hpp +3 -3
  135. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_darwin_ulock.hpp +90 -16
  136. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp +80 -11
  137. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_emulated.hpp +160 -15
  138. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_freebsd_umtx.hpp +327 -38
  139. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_futex.hpp +276 -33
  140. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_generic.hpp +260 -20
  141. data/src/cxx_supportlib/vendor-modified/boost/atomic/fences.hpp +4 -3
  142. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic.hpp +14 -18
  143. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_flag.hpp +2 -2
  144. data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_ref.hpp +13 -13
  145. data/src/cxx_supportlib/vendor-modified/boost/atomic/posix_clock_traits_fwd.hpp +59 -0
  146. data/src/cxx_supportlib/vendor-modified/boost/atomic/thread_pause.hpp +102 -0
  147. data/src/cxx_supportlib/vendor-modified/boost/atomic/wait_result.hpp +56 -0
  148. data/src/cxx_supportlib/vendor-modified/boost/atomic.hpp +4 -1
  149. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +5 -0
  150. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
  151. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +108 -41
  152. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +1235 -1009
  153. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +3 -2
  154. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +56 -0
  155. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +1 -0
  156. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +9 -9
  157. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +23 -2
  158. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +0 -1
  159. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +88 -23
  160. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +2 -1
  161. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +2 -2
  162. data/src/cxx_supportlib/vendor-modified/boost/container/detail/operator_new_helpers.hpp +68 -0
  163. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +72 -13
  164. data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +13 -0
  165. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +8 -5
  166. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +31 -10
  167. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +37 -10
  168. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +19 -0
  169. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +72 -5
  171. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +3 -10
  172. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +54 -23
  173. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/devector.hpp +6 -4
  174. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +19 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +32 -5
  176. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +27 -2
  177. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +22 -0
  178. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +37 -17
  179. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +23 -1
  180. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +41 -20
  181. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +5 -8
  182. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +3 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_is_avalanching.hpp +57 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +29 -29
  185. data/src/cxx_supportlib/vendor-modified/boost/core/cmath.hpp +3 -3
  186. data/src/cxx_supportlib/vendor-modified/boost/core/data.hpp +15 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/core/default_allocator.hpp +1 -0
  188. data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +1 -1
  189. data/src/cxx_supportlib/vendor-modified/boost/core/detail/assert.hpp +18 -0
  190. data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_sleep.hpp +2 -2
  191. data/src/cxx_supportlib/vendor-modified/boost/core/detail/static_assert.hpp +42 -0
  192. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +16 -10
  193. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +35 -27
  194. data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +1 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/core/size.hpp +14 -0
  196. data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +20 -9
  197. data/src/cxx_supportlib/vendor-modified/boost/cregex.hpp +0 -5
  198. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +8 -0
  199. data/src/cxx_supportlib/vendor-modified/boost/describe/modifiers.hpp +1 -1
  200. data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +1 -0
  201. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +4 -4
  202. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +2 -2
  203. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_rebind.hpp +9 -0
  204. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +1 -0
  205. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +2 -2
  206. data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +43 -64
  207. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_def.hpp +0 -83
  208. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_undef.hpp +1 -5
  209. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/eval_if_default.hpp +44 -0
  210. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +103 -117
  211. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/conjunction.hpp +53 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/disjunction.hpp +53 -0
  213. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/negation.hpp +53 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/type_traits/type_identity.hpp +54 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +32 -38
  216. data/src/cxx_supportlib/vendor-modified/boost/iterator/enable_if_convertible.hpp +84 -0
  217. data/src/cxx_supportlib/vendor-modified/boost/iterator/interoperable.hpp +22 -34
  218. data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +16 -16
  219. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +162 -309
  220. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_categories.hpp +52 -161
  221. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +3 -11
  222. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +804 -977
  223. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_traits.hpp +24 -17
  224. data/src/cxx_supportlib/vendor-modified/boost/iterator/min_category.hpp +83 -0
  225. data/src/cxx_supportlib/vendor-modified/boost/iterator/minimum_category.hpp +11 -73
  226. data/src/cxx_supportlib/vendor-modified/boost/iterator/reverse_iterator.hpp +56 -57
  227. data/src/cxx_supportlib/vendor-modified/boost/iterator/transform_iterator.hpp +123 -156
  228. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +1 -1
  230. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +36 -33
  231. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +43 -50
  232. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +23 -27
  233. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
  234. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +10 -11
  235. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +1 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +6 -7
  238. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/type_traits.hpp +81 -0
  239. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +4 -4
  240. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +8 -9
  241. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +1 -12
  243. data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +8 -26
  244. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_to_raw_pointer.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/move/detail/launder.hpp +1 -1
  246. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_begin.hpp +6 -0
  247. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +2 -2
  248. data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +11 -44
  249. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +34 -0
  250. data/src/cxx_supportlib/vendor-modified/boost/mp11/set.hpp +33 -1
  251. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  252. data/src/cxx_supportlib/vendor-modified/boost/mpl/and.hpp +4 -8
  253. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_assert.hpp +1 -1
  254. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/ptr_to_ref.hpp +1 -1
  255. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitand.hpp +2 -6
  256. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitor.hpp +2 -6
  257. data/src/cxx_supportlib/vendor-modified/boost/mpl/or.hpp +2 -6
  258. data/src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp +1 -1
  259. data/src/cxx_supportlib/vendor-modified/boost/pool/simple_segregated_storage.hpp +0 -13
  260. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/limits/to_seq_256.hpp +190 -190
  261. data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +12 -2
  262. data/src/cxx_supportlib/vendor-modified/boost/random/detail/config.hpp +4 -0
  263. data/src/cxx_supportlib/vendor-modified/boost/random/detail/size.hpp +41 -0
  264. data/src/cxx_supportlib/vendor-modified/boost/random/detail/xoshiro_base.hpp +472 -0
  265. data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +7 -10
  266. data/src/cxx_supportlib/vendor-modified/boost/random/gamma_distribution.hpp +1 -1
  267. data/src/cxx_supportlib/vendor-modified/boost/random/generalized_inverse_gaussian_distribution.hpp +339 -0
  268. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +12 -14
  269. data/src/cxx_supportlib/vendor-modified/boost/random/inverse_gaussian_distribution.hpp +226 -0
  270. data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +1 -4
  271. data/src/cxx_supportlib/vendor-modified/boost/random/mixmax.hpp +63 -63
  272. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_constant_distribution.hpp +7 -10
  273. data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_linear_distribution.hpp +8 -11
  274. data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +1 -3
  275. data/src/cxx_supportlib/vendor-modified/boost/random/splitmix64.hpp +1 -4
  276. data/src/cxx_supportlib/vendor-modified/boost/random/xoshiro.hpp +488 -0
  277. data/src/cxx_supportlib/vendor-modified/boost/random.hpp +3 -0
  278. data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +2 -0
  279. data/src/cxx_supportlib/vendor-modified/boost/range/detail/has_member_size.hpp +1 -0
  280. data/src/cxx_supportlib/vendor-modified/boost/range/detail/msvc_has_iterator_workaround.hpp +2 -0
  281. data/src/cxx_supportlib/vendor-modified/boost/range/has_range_iterator.hpp +1 -1
  282. data/src/cxx_supportlib/vendor-modified/boost/range/iterator.hpp +1 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +4 -1
  284. data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +1 -1
  285. data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +35 -18
  286. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +18 -101
  287. data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +0 -4
  288. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/object_cache.hpp +0 -4
  289. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +0 -6
  290. data/src/cxx_supportlib/vendor-modified/boost/regex/regex_traits.hpp +0 -4
  291. data/src/cxx_supportlib/vendor-modified/boost/regex/user.hpp +4 -10
  292. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex.hpp +63 -17
  293. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_creator.hpp +71 -16
  294. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/basic_regex_parser.hpp +22 -1
  295. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/c_regex_traits.hpp +11 -4
  296. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/char_regex_traits.hpp +2 -0
  297. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cpp_regex_traits.hpp +11 -8
  298. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/cregex.hpp +2 -1
  299. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/error_type.hpp +1 -1
  300. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +40 -38
  301. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_category.hpp +2 -0
  302. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/iterator_traits.hpp +4 -0
  303. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_flags.hpp +39 -37
  304. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/match_results.hpp +46 -9
  305. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/mem_block_cache.hpp +4 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/object_cache.hpp +2 -0
  307. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/pattern_except.hpp +6 -4
  308. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher.hpp +57 -8
  309. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_common.hpp +21 -6
  310. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/perl_matcher_non_recursive.hpp +18 -3
  311. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regbase.hpp +4 -2
  312. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex.hpp +6 -6
  313. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_format.hpp +23 -18
  314. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_fwd.hpp +9 -9
  315. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_grep.hpp +9 -5
  316. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_iterator.hpp +11 -7
  317. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_match.hpp +10 -7
  318. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_merge.hpp +4 -4
  319. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_raw_buffer.hpp +3 -0
  320. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_replace.hpp +6 -2
  321. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_search.hpp +12 -9
  322. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_split.hpp +6 -3
  323. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_token_iterator.hpp +16 -11
  324. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_traits.hpp +1 -1
  325. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_traits_defaults.hpp +2 -0
  326. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +2 -0
  327. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/states.hpp +7 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/sub_match.hpp +54 -49
  329. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/syntax_type.hpp +64 -62
  330. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_iterator.hpp +16 -0
  331. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/u32regex_token_iterator.hpp +12 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/unicode_iterator.hpp +6 -4
  333. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/w32_regex_traits.hpp +3 -1
  334. data/src/cxx_supportlib/vendor-modified/boost/regex.hpp +0 -4
  335. data/src/cxx_supportlib/vendor-modified/boost/regex_fwd.hpp +0 -4
  336. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +1 -43
  337. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/deprecated_macros.hpp +7 -7
  338. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +2 -77
  339. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +1 -64
  340. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +3 -3
  341. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -77
  342. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_cxx20_constexpr.hpp +37 -0
  343. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +5 -28
  344. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +41 -40
  345. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +0 -15
  346. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +0 -18
  347. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +1 -1
  348. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +1 -1
  349. data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +1 -0
  350. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +8 -6
  351. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complete.hpp +31 -10
  352. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +34 -8
  353. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +6 -4
  354. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +9 -1
  355. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +5 -5
  356. data/src/cxx_supportlib/vendor-modified/boost/unordered/{unordered_printers.hpp → detail/unordered_printers.hpp} +34 -36
  357. data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +6 -49
  358. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +6 -1
  359. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +6 -1
  360. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +6 -1
  361. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +6 -1
  362. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  363. data/src/nginx_module/ContentHandler.c +2 -0
  364. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +3 -5
  365. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +3 -5
  366. data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +3 -5
  367. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +3 -5
  368. data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +1 -1
  369. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +2 -2
  370. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +5 -3
  371. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +2 -2
  372. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +12 -23
  373. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +31 -32
  374. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +2 -2
  375. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -3
  376. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +2 -0
  377. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -1
  378. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +1 -1
  379. data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +1 -1
  380. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +1 -1
  381. data/src/ruby_supportlib/phusion_passenger.rb +8 -8
  382. metadata +27 -104
  383. data/src/cxx_supportlib/oxt/detail/spin_lock_darwin.hpp +0 -75
  384. data/src/cxx_supportlib/oxt/detail/spin_lock_gcc_x86.hpp +0 -85
  385. data/src/cxx_supportlib/oxt/detail/spin_lock_portable.hpp +0 -38
  386. data/src/cxx_supportlib/oxt/detail/spin_lock_pthreads.hpp +0 -111
  387. data/src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp +0 -47
  388. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc_posix.hpp +0 -41
  389. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc_sunos.hpp +0 -34
  390. data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -28
  391. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +0 -68
  392. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/conditional.hpp +0 -42
  393. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/integral_constant.hpp +0 -46
  394. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_enum.hpp +0 -42
  395. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_function.hpp +0 -42
  396. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_nothrow_default_constructible.hpp +0 -46
  397. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/remove_cv.hpp +0 -42
  398. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_on_address.hpp +0 -64
  399. data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +0 -15
  400. data/src/cxx_supportlib/vendor-modified/boost/detail/indirect_traits.hpp +0 -195
  401. data/src/cxx_supportlib/vendor-modified/boost/detail/select_type.hpp +0 -36
  402. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/enable_if.hpp +0 -83
  403. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/internals.hpp +0 -35
  404. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +0 -120
  405. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_debug.cpp +0 -59
  406. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +0 -189
  407. data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/error_code.cpp +0 -31
  408. data/src/cxx_supportlib/vendor-modified/boost/regex/config/borland.hpp +0 -72
  409. data/src/cxx_supportlib/vendor-modified/boost/regex/config/cwchar.hpp +0 -207
  410. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/static_mutex.hpp +0 -182
  411. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +0 -797
  412. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +0 -1598
  413. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +0 -3174
  414. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/c_regex_traits.hpp +0 -511
  415. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/char_regex_traits.hpp +0 -81
  416. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +0 -1237
  417. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +0 -213
  418. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/error_type.hpp +0 -59
  419. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/icu.hpp +0 -1516
  420. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/indexed_bit_flag.hpp +0 -54
  421. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp +0 -91
  422. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_traits.hpp +0 -135
  423. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +0 -161
  424. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +0 -716
  425. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +0 -183
  426. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/object_cache.hpp +0 -171
  427. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/pattern_except.hpp +0 -128
  428. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +0 -645
  429. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +0 -1030
  430. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +0 -1947
  431. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +0 -1131
  432. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/primary_transform.hpp +0 -146
  433. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/protected_call.hpp +0 -83
  434. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regbase.hpp +0 -180
  435. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex.hpp +0 -166
  436. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +0 -1158
  437. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_fwd.hpp +0 -73
  438. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_grep.hpp +0 -155
  439. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +0 -195
  440. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_match.hpp +0 -382
  441. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_merge.hpp +0 -93
  442. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +0 -241
  443. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_replace.hpp +0 -99
  444. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_search.hpp +0 -217
  445. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_split.hpp +0 -174
  446. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +0 -327
  447. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +0 -189
  448. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +0 -997
  449. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +0 -237
  450. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/states.hpp +0 -321
  451. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/sub_match.hpp +0 -516
  452. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/syntax_type.hpp +0 -105
  453. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_iterator.hpp +0 -185
  454. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +0 -360
  455. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/unicode_iterator.hpp +0 -871
  456. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +0 -1229
  457. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
  458. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
  459. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
  460. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
  461. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
  462. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
  463. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
  464. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
  465. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
  466. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
  467. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
  468. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
  469. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
  470. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
  471. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
  472. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
  473. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
  474. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
  475. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
  476. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
  477. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -30
  478. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
  479. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +0 -128
  480. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_nt.hpp +0 -96
  481. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_pt.hpp +0 -86
  482. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_sync.hpp +0 -94
@@ -7,1048 +7,877 @@
7
7
  #ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP
8
8
  #define BOOST_ITERATOR_FACADE_23022003THW_HPP
9
9
 
10
+ #include <cstddef>
11
+ #include <memory>
12
+ #include <utility>
13
+ #include <type_traits>
14
+
10
15
  #include <boost/config.hpp>
16
+ #include <boost/mp11/utility.hpp>
17
+
11
18
  #include <boost/iterator/interoperable.hpp>
12
19
  #include <boost/iterator/iterator_traits.hpp>
13
20
  #include <boost/iterator/iterator_categories.hpp>
14
-
15
21
  #include <boost/iterator/detail/facade_iterator_category.hpp>
16
- #include <boost/iterator/detail/enable_if.hpp>
17
-
18
- #include <boost/static_assert.hpp>
19
- #include <boost/core/addressof.hpp>
20
-
21
- #include <boost/type_traits/is_same.hpp>
22
- #include <boost/type_traits/add_const.hpp>
23
- #include <boost/type_traits/add_pointer.hpp>
24
- #include <boost/type_traits/add_lvalue_reference.hpp>
25
- #include <boost/type_traits/remove_const.hpp>
26
- #include <boost/type_traits/remove_reference.hpp>
27
- #include <boost/type_traits/is_convertible.hpp>
28
- #include <boost/type_traits/is_pod.hpp>
29
-
30
- #include <boost/mpl/eval_if.hpp>
31
- #include <boost/mpl/if.hpp>
32
- #include <boost/mpl/or.hpp>
33
- #include <boost/mpl/and.hpp>
34
- #include <boost/mpl/not.hpp>
35
- #include <boost/mpl/always.hpp>
36
- #include <boost/mpl/apply.hpp>
37
- #include <boost/mpl/identity.hpp>
38
-
39
- #include <cstddef>
40
-
41
- #include <boost/iterator/detail/config_def.hpp> // this goes last
22
+ #include <boost/iterator/detail/type_traits/conjunction.hpp>
23
+ #include <boost/iterator/detail/type_traits/negation.hpp>
42
24
 
43
25
  namespace boost {
44
26
  namespace iterators {
45
27
 
46
- // This forward declaration is required for the friend declaration
47
- // in iterator_core_access
48
- template <class I, class V, class TC, class R, class D> class iterator_facade;
28
+ // This forward declaration is required for the friend declaration
29
+ // in iterator_core_access
30
+ template<
31
+ typename Derived,
32
+ typename Value,
33
+ typename CategoryOrTraversal,
34
+ typename Reference = Value&,
35
+ typename Difference = std::ptrdiff_t
36
+ >
37
+ class iterator_facade;
38
+
39
+ namespace detail {
40
+
41
+ // The type trait checks if the category or traversal is at least as advanced as the specified required traversal
42
+ template< typename CategoryOrTraversal, typename Required >
43
+ struct is_traversal_at_least :
44
+ public std::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required >
45
+ {};
46
+
47
+ //
48
+ // enable if for use in operator implementation.
49
+ //
50
+ template<
51
+ typename Facade1,
52
+ typename Facade2,
53
+ typename Return
54
+ >
55
+ struct enable_if_interoperable :
56
+ public std::enable_if<
57
+ is_interoperable< Facade1, Facade2 >::value,
58
+ Return
59
+ >
60
+ {};
61
+
62
+ //
63
+ // enable if for use in implementation of operators specific for random access traversal.
64
+ //
65
+ template<
66
+ typename Facade1,
67
+ typename Facade2,
68
+ typename Return
69
+ >
70
+ struct enable_if_interoperable_and_random_access_traversal :
71
+ public std::enable_if<
72
+ detail::conjunction<
73
+ is_interoperable< Facade1, Facade2 >,
74
+ is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag >,
75
+ is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag >
76
+ >::value,
77
+ Return
78
+ >
79
+ {};
80
+
81
+ //
82
+ // Generates associated types for an iterator_facade with the
83
+ // given parameters.
84
+ //
85
+ template<
86
+ typename ValueParam,
87
+ typename CategoryOrTraversal,
88
+ typename Reference,
89
+ typename Difference
90
+ >
91
+ struct iterator_facade_types
92
+ {
93
+ using iterator_category = typename facade_iterator_category<
94
+ CategoryOrTraversal, ValueParam, Reference
95
+ >::type;
96
+
97
+ using value_type = typename std::remove_const< ValueParam >::type;
98
+
99
+ // Not the real associated pointer type
100
+ using pointer = typename std::add_pointer<
101
+ typename std::conditional<
102
+ boost::iterators::detail::iterator_writability_disabled< ValueParam, Reference >::value,
103
+ const value_type,
104
+ value_type
105
+ >::type
106
+ >::type;
107
+ };
108
+
109
+ // iterators whose dereference operators reference the same value
110
+ // for all iterators into the same sequence (like many input
111
+ // iterators) need help with their postfix ++: the referenced
112
+ // value must be read and stored away before the increment occurs
113
+ // so that *a++ yields the originally referenced element and not
114
+ // the next one.
115
+ template< typename Iterator >
116
+ class postfix_increment_proxy
117
+ {
118
+ using value_type = typename iterator_value< Iterator >::type;
119
+
120
+ public:
121
+ explicit postfix_increment_proxy(Iterator const& x) :
122
+ stored_iterator(x),
123
+ stored_value(*x)
124
+ {}
125
+
126
+ // Returning a mutable reference allows nonsense like
127
+ // (*r++).mutate(), but it imposes fewer assumptions about the
128
+ // behavior of the value_type. In particular, recall that
129
+ // (*r).mutate() is legal if operator* returns by value.
130
+ // Provides readability of *r++
131
+ value_type& operator*() const
132
+ {
133
+ return stored_value;
134
+ }
49
135
 
50
- namespace detail
51
- {
52
- // A binary metafunction class that always returns bool. VC6
53
- // ICEs on mpl::always<bool>, probably because of the default
54
- // parameters.
55
- struct always_bool2
136
+ // Provides X(r++)
137
+ operator Iterator const&() const
56
138
  {
57
- template <class T, class U>
58
- struct apply
59
- {
60
- typedef bool type;
61
- };
62
- };
139
+ return stored_iterator;
140
+ }
63
141
 
64
- // The type trait checks if the category or traversal is at least as advanced as the specified required traversal
65
- template< typename CategoryOrTraversal, typename Required >
66
- struct is_traversal_at_least :
67
- public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required >
68
- {};
142
+ // Provides (r++)->foo()
143
+ value_type* operator->() const
144
+ {
145
+ return std::addressof(stored_value);
146
+ }
69
147
 
70
- //
71
- // enable if for use in operator implementation.
72
- //
73
- template <
74
- class Facade1
75
- , class Facade2
76
- , class Return
77
- >
78
- struct enable_if_interoperable :
79
- public boost::iterators::enable_if<
80
- is_interoperable< Facade1, Facade2 >
81
- , Return
82
- >
83
- {};
148
+ private:
149
+ Iterator stored_iterator;
150
+ mutable value_type stored_value;
151
+ };
152
+
153
+
154
+ template< typename Iterator >
155
+ class writable_postfix_increment_dereference_proxy;
156
+
157
+ template< typename T >
158
+ struct is_not_writable_postfix_increment_dereference_proxy :
159
+ public std::true_type
160
+ {};
161
+
162
+ template< typename Iterator >
163
+ struct is_not_writable_postfix_increment_dereference_proxy<
164
+ writable_postfix_increment_dereference_proxy< Iterator >
165
+ > :
166
+ public std::false_type
167
+ {};
168
+
169
+ template< typename Iterator >
170
+ class writable_postfix_increment_proxy;
171
+
172
+ //
173
+ // In general, we can't determine that such an iterator isn't
174
+ // writable -- we also need to store a copy of the old iterator so
175
+ // that it can be written into.
176
+ template< typename Iterator >
177
+ class writable_postfix_increment_dereference_proxy
178
+ {
179
+ friend class writable_postfix_increment_proxy< Iterator >;
180
+
181
+ using value_type = typename iterator_value< Iterator >::type;
182
+
183
+ public:
184
+ explicit writable_postfix_increment_dereference_proxy(Iterator const& x) :
185
+ stored_iterator(x),
186
+ stored_value(*x)
187
+ {}
188
+
189
+ // Provides readability of *r++
190
+ operator value_type&() const
191
+ {
192
+ return this->stored_value;
193
+ }
84
194
 
85
- //
86
- // enable if for use in implementation of operators specific for random access traversal.
87
- //
88
- template <
89
- class Facade1
90
- , class Facade2
91
- , class Return
92
- >
93
- struct enable_if_interoperable_and_random_access_traversal :
94
- public boost::iterators::enable_if<
95
- mpl::and_<
96
- is_interoperable< Facade1, Facade2 >
97
- , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag >
98
- , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag >
99
- >
100
- , Return
101
- >
102
- {};
195
+ template< typename OtherIterator >
196
+ writable_postfix_increment_dereference_proxy const&
197
+ operator=(writable_postfix_increment_dereference_proxy< OtherIterator > const& x) const
198
+ {
199
+ typedef typename iterator_value< OtherIterator >::type other_value_type;
200
+ *this->stored_iterator = static_cast< other_value_type& >(x);
201
+ return *this;
202
+ }
103
203
 
104
- //
105
- // Generates associated types for an iterator_facade with the
106
- // given parameters.
107
- //
108
- template <
109
- class ValueParam
110
- , class CategoryOrTraversal
111
- , class Reference
112
- , class Difference
113
- >
114
- struct iterator_facade_types
204
+ // Provides writability of *r++
205
+ template< typename T >
206
+ typename std::enable_if<
207
+ is_not_writable_postfix_increment_dereference_proxy< T >::value,
208
+ writable_postfix_increment_dereference_proxy const&
209
+ >::type operator=(T&& x) const
115
210
  {
116
- typedef typename facade_iterator_category<
117
- CategoryOrTraversal, ValueParam, Reference
118
- >::type iterator_category;
119
-
120
- typedef typename remove_const<ValueParam>::type value_type;
121
-
122
- // Not the real associated pointer type
123
- typedef typename mpl::eval_if<
124
- boost::iterators::detail::iterator_writability_disabled<ValueParam,Reference>
125
- , add_pointer<const value_type>
126
- , add_pointer<value_type>
127
- >::type pointer;
128
-
129
- # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
130
- && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \
131
- || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \
132
- || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \
133
- || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310)
134
-
135
- // To interoperate with some broken library/compiler
136
- // combinations, user-defined iterators must be derived from
137
- // std::iterator. It is possible to implement a standard
138
- // library for broken compilers without this limitation.
139
- # define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1
140
-
141
- typedef
142
- iterator<iterator_category, value_type, Difference, pointer, Reference>
143
- base;
144
- # endif
145
- };
211
+ *this->stored_iterator = static_cast< T&& >(x);
212
+ return *this;
213
+ }
214
+
215
+ private:
216
+ Iterator stored_iterator;
217
+ mutable value_type stored_value;
218
+ };
219
+
220
+ template< typename Iterator >
221
+ class writable_postfix_increment_proxy
222
+ {
223
+ using value_type = typename iterator_value< Iterator >::type;
224
+
225
+ public:
226
+ explicit writable_postfix_increment_proxy(Iterator const& x) :
227
+ dereference_proxy(x)
228
+ {}
229
+
230
+ writable_postfix_increment_dereference_proxy< Iterator > const&
231
+ operator*() const
232
+ {
233
+ return dereference_proxy;
234
+ }
235
+
236
+ // Provides X(r++)
237
+ operator Iterator const&() const
238
+ {
239
+ return dereference_proxy.stored_iterator;
240
+ }
241
+
242
+ // Provides (r++)->foo()
243
+ value_type* operator->() const
244
+ {
245
+ return std::addressof(dereference_proxy.stored_value);
246
+ }
247
+
248
+ private:
249
+ writable_postfix_increment_dereference_proxy< Iterator > dereference_proxy;
250
+ };
146
251
 
147
- // iterators whose dereference operators reference the same value
148
- // for all iterators into the same sequence (like many input
149
- // iterators) need help with their postfix ++: the referenced
150
- // value must be read and stored away before the increment occurs
151
- // so that *a++ yields the originally referenced element and not
152
- // the next one.
153
- template <class Iterator>
154
- class postfix_increment_proxy
252
+ template< typename Reference, typename Value >
253
+ struct is_non_proxy_reference :
254
+ public std::is_convertible<
255
+ typename std::remove_reference< Reference >::type const volatile*,
256
+ Value const volatile*
257
+ >
258
+ {};
259
+
260
+ // A metafunction to choose the result type of postfix ++
261
+ //
262
+ // Because the C++98 input iterator requirements say that *r++ has
263
+ // type T (value_type), implementations of some standard
264
+ // algorithms like lexicographical_compare may use constructions
265
+ // like:
266
+ //
267
+ // *r++ < *s++
268
+ //
269
+ // If *r++ returns a proxy (as required if r is writable but not
270
+ // multipass), this sort of expression will fail unless the proxy
271
+ // supports the operator<. Since there are any number of such
272
+ // operations, we're not going to try to support them. Therefore,
273
+ // even if r++ returns a proxy, *r++ will only return a proxy if
274
+ // *r also returns a proxy.
275
+ template< typename Iterator, typename Value, typename Reference, typename CategoryOrTraversal >
276
+ struct postfix_increment_result
277
+ {
278
+ using type = mp11::mp_eval_if_not<
279
+ detail::conjunction<
280
+ // A proxy is only needed for readable iterators
281
+ std::is_convertible<
282
+ Reference,
283
+ // Use add_lvalue_reference to form `reference to Value` due to
284
+ // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject
285
+ // 'reference-to-reference' in the template which described in CWG
286
+ // DR106.
287
+ // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106
288
+ typename std::add_lvalue_reference< Value const >::type
289
+ >,
290
+
291
+ // No multipass iterator can have values that disappear
292
+ // before positions can be re-visited
293
+ detail::negation<
294
+ detail::is_traversal_at_least< CategoryOrTraversal, forward_traversal_tag >
295
+ >
296
+ >,
297
+ Iterator,
298
+ mp11::mp_if,
299
+ is_non_proxy_reference< Reference, Value >,
300
+ postfix_increment_proxy< Iterator >,
301
+ writable_postfix_increment_proxy< Iterator >
302
+ >;
303
+ };
304
+
305
+ // operator->() needs special support for input iterators to strictly meet the
306
+ // standard's requirements. If *i is not a reference type, we must still
307
+ // produce an lvalue to which a pointer can be formed. We do that by
308
+ // returning a proxy object containing an instance of the reference object.
309
+ template< typename Reference, typename Pointer >
310
+ struct operator_arrow_dispatch // proxy references
311
+ {
312
+ struct proxy
155
313
  {
156
- typedef typename iterator_value<Iterator>::type value_type;
157
-
158
- public:
159
- explicit postfix_increment_proxy(Iterator const& x)
160
- : stored_iterator(x)
161
- , stored_value(*x)
162
- {}
163
-
164
- // Returning a mutable reference allows nonsense like
165
- // (*r++).mutate(), but it imposes fewer assumptions about the
166
- // behavior of the value_type. In particular, recall that
167
- // (*r).mutate() is legal if operator* returns by value.
168
- // Provides readability of *r++
169
- value_type& operator*() const
170
- {
171
- return stored_value;
172
- }
173
-
174
- // Provides X(r++)
175
- operator Iterator const&() const
176
- {
177
- return stored_iterator;
178
- }
179
-
180
- // Provides (r++)->foo()
181
- value_type* operator->() const
182
- {
183
- return boost::addressof(stored_value);
184
- }
185
-
186
- private:
187
- Iterator stored_iterator;
188
- mutable value_type stored_value;
314
+ explicit proxy(Reference const& x) : m_ref(x) {}
315
+ Reference* operator->() { return std::addressof(m_ref); }
316
+ // This function is needed for MWCW and BCC, which won't call
317
+ // operator-> again automatically per 13.3.1.2 para 8
318
+ operator Reference*() { return std::addressof(m_ref); }
319
+ Reference m_ref;
189
320
  };
190
321
 
322
+ using result_type = proxy;
323
+
324
+ static result_type apply(Reference const& x)
325
+ {
326
+ return result_type(x);
327
+ }
328
+ };
191
329
 
192
- template <class Iterator>
193
- class writable_postfix_increment_dereference_proxy;
330
+ template< typename T, typename Pointer >
331
+ struct operator_arrow_dispatch< T&, Pointer > // "real" references
332
+ {
333
+ using result_type = Pointer;
194
334
 
195
- template <class T>
196
- struct is_not_writable_postfix_increment_dereference_proxy :
197
- public boost::true_type
198
- {};
335
+ static result_type apply(T& x)
336
+ {
337
+ return std::addressof(x);
338
+ }
339
+ };
340
+
341
+ // A proxy return type for operator[], needed to deal with
342
+ // iterators that may invalidate referents upon destruction.
343
+ // Consider the temporary iterator in *(a + n)
344
+ template< typename Iterator >
345
+ class operator_brackets_proxy
346
+ {
347
+ // Iterator is actually an iterator_facade, so we do not have to
348
+ // go through iterator_traits to access the traits.
349
+ using reference = typename Iterator::reference;
350
+
351
+ public:
352
+ explicit operator_brackets_proxy(Iterator const& iter) noexcept(std::is_nothrow_copy_constructible< Iterator >::value) :
353
+ m_iter(iter)
354
+ {}
355
+
356
+ operator reference() const noexcept(noexcept(*std::declval< Iterator const& >()))
357
+ {
358
+ return *m_iter;
359
+ }
199
360
 
200
- template <class Iterator>
201
- struct is_not_writable_postfix_increment_dereference_proxy<
202
- writable_postfix_increment_dereference_proxy<Iterator>
203
- > :
204
- public boost::false_type
205
- {};
361
+ template< typename T >
362
+ typename std::enable_if<
363
+ detail::conjunction<
364
+ detail::negation<
365
+ std::is_same<
366
+ operator_brackets_proxy< Iterator >,
367
+ typename std::remove_cv< typename std::remove_reference< T >::type >::type
368
+ >
369
+ >,
370
+ std::is_assignable< reference, T&& >
371
+ >::value,
372
+ operator_brackets_proxy&
373
+ >::type operator= (T&& val) noexcept(noexcept(*std::declval< Iterator& >() = std::declval< T&& >()))
374
+ {
375
+ *m_iter = static_cast< T&& >(val);
376
+ return *this;
377
+ }
206
378
 
207
- template <class Iterator>
208
- class writable_postfix_increment_proxy;
379
+ // Provides it[n]->foo(). Leverages chaining of operator->.
380
+ reference operator->() const noexcept(noexcept(*std::declval< Iterator const& >()))
381
+ {
382
+ return *m_iter;
383
+ }
209
384
 
210
- //
211
- // In general, we can't determine that such an iterator isn't
212
- // writable -- we also need to store a copy of the old iterator so
213
- // that it can be written into.
214
- template <class Iterator>
215
- class writable_postfix_increment_dereference_proxy
385
+ // Provides (*it[n]).foo()
386
+ template< typename Ref = reference, typename Result = decltype(*std::declval< Ref >()) >
387
+ Result operator*() const noexcept(noexcept(**std::declval< Iterator const& >()))
216
388
  {
217
- friend class writable_postfix_increment_proxy<Iterator>;
389
+ return **m_iter;
390
+ }
218
391
 
219
- typedef typename iterator_value<Iterator>::type value_type;
392
+ private:
393
+ Iterator m_iter;
394
+ };
395
+
396
+ // A binary metafunction class that always returns bool.
397
+ template< typename Iterator1, typename Iterator2 >
398
+ using always_bool_t = bool;
399
+
400
+ template< typename Iterator1, typename Iterator2 >
401
+ using choose_difference_type_t = typename std::conditional<
402
+ std::is_convertible< Iterator2, Iterator1 >::value,
403
+ iterator_difference< Iterator1 >,
404
+ iterator_difference< Iterator2 >
405
+ >::type::type;
406
+
407
+ template<
408
+ typename Derived,
409
+ typename Value,
410
+ typename CategoryOrTraversal,
411
+ typename Reference,
412
+ typename Difference,
413
+ bool IsBidirectionalTraversal,
414
+ bool IsRandomAccessTraversal
415
+ >
416
+ class iterator_facade_base;
417
+
418
+ } // namespace detail
419
+
420
+
421
+ // Macros which describe the declarations of binary operators
422
+ #define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
423
+ template< \
424
+ typename Derived1, typename V1, typename TC1, typename Reference1, typename Difference1, \
425
+ typename Derived2, typename V2, typename TC2, typename Reference2, typename Difference2 \
426
+ > \
427
+ prefix typename enabler< \
428
+ Derived1, Derived2, \
429
+ result_type< Derived1, Derived2 > \
430
+ >::type \
431
+ operator op( \
432
+ iterator_facade< Derived1, V1, TC1, Reference1, Difference1 > const& lhs, \
433
+ iterator_facade< Derived2, V2, TC2, Reference2, Difference2 > const& rhs)
220
434
 
221
- public:
222
- explicit writable_postfix_increment_dereference_proxy(Iterator const& x)
223
- : stored_iterator(x)
224
- , stored_value(*x)
225
- {}
435
+ #define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
436
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable)
226
437
 
227
- // Provides readability of *r++
228
- operator value_type&() const
229
- {
230
- return this->stored_value;
231
- }
438
+ #define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \
439
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal)
232
440
 
233
- template <class OtherIterator>
234
- writable_postfix_increment_dereference_proxy const&
235
- operator=(writable_postfix_increment_dereference_proxy<OtherIterator> const& x) const
236
- {
237
- typedef typename iterator_value<OtherIterator>::type other_value_type;
238
- *this->stored_iterator = static_cast<other_value_type&>(x);
239
- return *this;
240
- }
241
-
242
- // Provides writability of *r++
243
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
244
- template <class T>
245
- typename iterators::enable_if<
246
- is_not_writable_postfix_increment_dereference_proxy< T >,
247
- writable_postfix_increment_dereference_proxy const&
248
- >::type operator=(T&& x) const
249
- {
250
- *this->stored_iterator = static_cast< T&& >(x);
251
- return *this;
252
- }
253
- #else
254
- template <class T>
255
- typename iterators::enable_if<
256
- is_not_writable_postfix_increment_dereference_proxy< T >,
257
- writable_postfix_increment_dereference_proxy const&
258
- >::type operator=(T const& x) const
259
- {
260
- *this->stored_iterator = x;
261
- return *this;
262
- }
263
-
264
- // This overload just in case only non-const objects are writable
265
- template <class T>
266
- typename iterators::enable_if<
267
- is_not_writable_postfix_increment_dereference_proxy< T >,
268
- writable_postfix_increment_dereference_proxy const&
269
- >::type operator=(T& x) const
270
- {
271
- *this->stored_iterator = x;
272
- return *this;
273
- }
274
- #endif
275
-
276
- private:
277
- Iterator stored_iterator;
278
- mutable value_type stored_value;
279
- };
441
+ #define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
442
+ template< typename Derived, typename V, typename TC, typename R, typename D > \
443
+ prefix typename std::enable_if< \
444
+ boost::iterators::detail::is_traversal_at_least< \
445
+ TC, \
446
+ boost::iterators::random_access_traversal_tag \
447
+ >::value, \
448
+ Derived \
449
+ >::type operator+ args
280
450
 
281
- template <class Iterator>
282
- class writable_postfix_increment_proxy
451
+ //
452
+ // Helper class for granting access to the iterator core interface.
453
+ //
454
+ // The simple core interface is used by iterator_facade. The core
455
+ // interface of a user/library defined iterator type should not be made public
456
+ // so that it does not clutter the public interface. Instead iterator_core_access
457
+ // should be made friend so that iterator_facade can access the core
458
+ // interface through iterator_core_access.
459
+ //
460
+ class iterator_core_access
461
+ {
462
+ template< typename I, typename V, typename TC, typename R, typename D >
463
+ friend class iterator_facade;
464
+ template< typename I, typename V, typename TC, typename R, typename D, bool IsBidirectionalTraversal, bool IsRandomAccessTraversal >
465
+ friend class detail::iterator_facade_base;
466
+
467
+ #define BOOST_ITERATOR_FACADE_RELATION(op) \
468
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend, op, boost::iterators::detail::always_bool_t);
469
+
470
+ BOOST_ITERATOR_FACADE_RELATION(==)
471
+ BOOST_ITERATOR_FACADE_RELATION(!=)
472
+
473
+ #undef BOOST_ITERATOR_FACADE_RELATION
474
+
475
+ #define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \
476
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend, op, boost::iterators::detail::always_bool_t);
477
+
478
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<)
479
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>)
480
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=)
481
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=)
482
+
483
+ #undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
484
+
485
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend, -, boost::iterators::detail::choose_difference_type_t);
486
+
487
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(
488
+ friend inline,
489
+ (iterator_facade< Derived, V, TC, R, D > const&, typename Derived::difference_type)
490
+ );
491
+
492
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(
493
+ friend inline,
494
+ (typename Derived::difference_type, iterator_facade< Derived, V, TC, R, D > const&)
495
+ );
496
+
497
+ template< typename Facade >
498
+ static typename Facade::reference dereference(Facade const& f)
283
499
  {
284
- typedef typename iterator_value<Iterator>::type value_type;
285
-
286
- public:
287
- explicit writable_postfix_increment_proxy(Iterator const& x)
288
- : dereference_proxy(x)
289
- {}
290
-
291
- writable_postfix_increment_dereference_proxy<Iterator> const&
292
- operator*() const
293
- {
294
- return dereference_proxy;
295
- }
296
-
297
- // Provides X(r++)
298
- operator Iterator const&() const
299
- {
300
- return dereference_proxy.stored_iterator;
301
- }
302
-
303
- // Provides (r++)->foo()
304
- value_type* operator->() const
305
- {
306
- return boost::addressof(dereference_proxy.stored_value);
307
- }
308
-
309
- private:
310
- writable_postfix_increment_dereference_proxy<Iterator> dereference_proxy;
311
- };
500
+ return f.dereference();
501
+ }
312
502
 
313
- # ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
503
+ template< typename Facade >
504
+ static void increment(Facade& f)
505
+ {
506
+ f.increment();
507
+ }
314
508
 
315
- template <class Reference, class Value>
316
- struct is_non_proxy_reference_impl
509
+ template< typename Facade >
510
+ static void decrement(Facade& f)
317
511
  {
318
- static Reference r;
512
+ f.decrement();
513
+ }
319
514
 
320
- template <class R>
321
- static typename mpl::if_<
322
- is_convertible<
323
- R const volatile*
324
- , Value const volatile*
325
- >
326
- , char[1]
327
- , char[2]
328
- >::type& helper(R const&);
515
+ template< typename Facade1, typename Facade2 >
516
+ static bool equal(Facade1 const& f1, Facade2 const& f2, std::true_type)
517
+ {
518
+ return f1.equal(f2);
519
+ }
329
520
 
330
- BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1);
331
- };
521
+ template< typename Facade1, typename Facade2 >
522
+ static bool equal(Facade1 const& f1, Facade2 const& f2, std::false_type)
523
+ {
524
+ return f2.equal(f1);
525
+ }
526
+
527
+ template< typename Facade >
528
+ static void advance(Facade& f, typename Facade::difference_type n)
529
+ {
530
+ f.advance(n);
531
+ }
532
+
533
+ template< typename Facade1, typename Facade2 >
534
+ static typename Facade1::difference_type distance_from(Facade1 const& f1, Facade2 const& f2, std::true_type)
535
+ {
536
+ return -f1.distance_to(f2);
537
+ }
538
+
539
+ template< typename Facade1, typename Facade2 >
540
+ static typename Facade2::difference_type distance_from(Facade1 const& f1, Facade2 const& f2, std::false_type)
541
+ {
542
+ return f2.distance_to(f1);
543
+ }
332
544
 
333
- template <class Reference, class Value>
334
- struct is_non_proxy_reference
335
- : mpl::bool_<
336
- is_non_proxy_reference_impl<Reference, Value>::value
337
- >
338
- {};
339
- # else
340
- template <class Reference, class Value>
341
- struct is_non_proxy_reference
342
- : is_convertible<
343
- typename remove_reference<Reference>::type
344
- const volatile*
345
- , Value const volatile*
346
- >
347
- {};
348
- # endif
349
-
350
- // A metafunction to choose the result type of postfix ++
351
- //
352
- // Because the C++98 input iterator requirements say that *r++ has
353
- // type T (value_type), implementations of some standard
354
- // algorithms like lexicographical_compare may use constructions
355
- // like:
356
545
  //
357
- // *r++ < *s++
546
+ // Curiously Recurring Template interface.
358
547
  //
359
- // If *r++ returns a proxy (as required if r is writable but not
360
- // multipass), this sort of expression will fail unless the proxy
361
- // supports the operator<. Since there are any number of such
362
- // operations, we're not going to try to support them. Therefore,
363
- // even if r++ returns a proxy, *r++ will only return a proxy if
364
- // *r also returns a proxy.
365
- template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
366
- struct postfix_increment_result
367
- : mpl::eval_if<
368
- mpl::and_<
369
- // A proxy is only needed for readable iterators
370
- is_convertible<
371
- Reference
372
- // Use add_lvalue_reference to form `reference to Value` due to
373
- // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject
374
- // 'reference-to-reference' in the template which described in CWG
375
- // DR106.
376
- // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106
377
- , typename add_lvalue_reference<Value const>::type
378
- >
548
+ template< typename I, typename V, typename TC, typename R, typename D >
549
+ static I& derived(iterator_facade< I, V, TC, R, D >& facade)
550
+ {
551
+ return *static_cast< I* >(&facade);
552
+ }
379
553
 
380
- // No multipass iterator can have values that disappear
381
- // before positions can be re-visited
382
- , mpl::not_<
383
- is_convertible<
384
- typename iterator_category_to_traversal<CategoryOrTraversal>::type
385
- , forward_traversal_tag
386
- >
387
- >
388
- >
389
- , mpl::if_<
390
- is_non_proxy_reference<Reference,Value>
391
- , postfix_increment_proxy<Iterator>
392
- , writable_postfix_increment_proxy<Iterator>
393
- >
394
- , mpl::identity<Iterator>
395
- >
396
- {};
397
-
398
- // operator->() needs special support for input iterators to strictly meet the
399
- // standard's requirements. If *i is not a reference type, we must still
400
- // produce an lvalue to which a pointer can be formed. We do that by
401
- // returning a proxy object containing an instance of the reference object.
402
- template <class Reference, class Pointer>
403
- struct operator_arrow_dispatch // proxy references
554
+ template< typename I, typename V, typename TC, typename R, typename D >
555
+ static I const& derived(iterator_facade< I, V, TC, R, D > const& facade)
404
556
  {
405
- struct proxy
406
- {
407
- explicit proxy(Reference const & x) : m_ref(x) {}
408
- Reference* operator->() { return boost::addressof(m_ref); }
409
- // This function is needed for MWCW and BCC, which won't call
410
- // operator-> again automatically per 13.3.1.2 para 8
411
- operator Reference*() { return boost::addressof(m_ref); }
412
- Reference m_ref;
413
- };
414
- typedef proxy result_type;
415
- static result_type apply(Reference const & x)
416
- {
417
- return result_type(x);
418
- }
419
- };
557
+ return *static_cast< I const* >(&facade);
558
+ }
420
559
 
421
- template <class T, class Pointer>
422
- struct operator_arrow_dispatch<T&, Pointer> // "real" references
560
+ // objects of this class are useless
561
+ iterator_core_access() = delete;
562
+ };
563
+
564
+ namespace detail {
565
+
566
+ // Implementation for forward traversal iterators
567
+ template<
568
+ typename Derived,
569
+ typename Value,
570
+ typename CategoryOrTraversal,
571
+ typename Reference,
572
+ typename Difference
573
+ >
574
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
575
+ {
576
+ private:
577
+ using associated_types = boost::iterators::detail::iterator_facade_types<
578
+ Value, CategoryOrTraversal, Reference, Difference
579
+ >;
580
+
581
+ using operator_arrow_dispatch_ = boost::iterators::detail::operator_arrow_dispatch<
582
+ Reference,
583
+ typename associated_types::pointer
584
+ >;
585
+
586
+ public:
587
+ using value_type = typename associated_types::value_type;
588
+ using reference = Reference;
589
+ using difference_type = Difference;
590
+
591
+ using pointer = typename operator_arrow_dispatch_::result_type;
592
+
593
+ using iterator_category = typename associated_types::iterator_category;
594
+
595
+ public:
596
+ reference operator*() const
423
597
  {
424
- typedef Pointer result_type;
425
- static result_type apply(T& x)
426
- {
427
- return boost::addressof(x);
428
- }
429
- };
598
+ return iterator_core_access::dereference(this->derived());
599
+ }
430
600
 
431
- // A proxy return type for operator[], needed to deal with
432
- // iterators that may invalidate referents upon destruction.
433
- // Consider the temporary iterator in *(a + n)
434
- template <class Iterator>
435
- class operator_brackets_proxy
601
+ pointer operator->() const
436
602
  {
437
- // Iterator is actually an iterator_facade, so we do not have to
438
- // go through iterator_traits to access the traits.
439
- typedef typename Iterator::reference reference;
440
- typedef typename Iterator::value_type value_type;
441
-
442
- public:
443
- operator_brackets_proxy(Iterator const& iter)
444
- : m_iter(iter)
445
- {}
446
-
447
- operator reference() const
448
- {
449
- return *m_iter;
450
- }
451
-
452
- operator_brackets_proxy& operator=(value_type const& val)
453
- {
454
- *m_iter = val;
455
- return *this;
456
- }
457
-
458
- private:
459
- Iterator m_iter;
460
- };
603
+ return operator_arrow_dispatch_::apply(*this->derived());
604
+ }
461
605
 
462
- // A metafunction that determines whether operator[] must return a
463
- // proxy, or whether it can simply return a copy of the value_type.
464
- template <class ValueType, class Reference>
465
- struct use_operator_brackets_proxy
466
- : mpl::not_<
467
- mpl::and_<
468
- // Really we want an is_copy_constructible trait here,
469
- // but is_POD will have to suffice in the meantime.
470
- boost::is_POD<ValueType>
471
- , iterator_writability_disabled<ValueType,Reference>
472
- >
473
- >
474
- {};
606
+ Derived& operator++()
607
+ {
608
+ iterator_core_access::increment(this->derived());
609
+ return this->derived();
610
+ }
475
611
 
476
- template <class Iterator, class Value, class Reference>
477
- struct operator_brackets_result
612
+ protected:
613
+ //
614
+ // Curiously Recurring Template interface.
615
+ //
616
+ Derived& derived()
478
617
  {
479
- typedef typename mpl::if_<
480
- use_operator_brackets_proxy<Value,Reference>
481
- , operator_brackets_proxy<Iterator>
482
- , Value
483
- >::type type;
484
- };
618
+ return *static_cast< Derived* >(this);
619
+ }
485
620
 
486
- template <class Iterator>
487
- operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
621
+ Derived const& derived() const
622
+ {
623
+ return *static_cast< Derived const* >(this);
624
+ }
625
+ };
626
+
627
+ // Implementation for bidirectional traversal iterators
628
+ template<
629
+ typename Derived,
630
+ typename Value,
631
+ typename CategoryOrTraversal,
632
+ typename Reference,
633
+ typename Difference
634
+ >
635
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > :
636
+ public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
637
+ {
638
+ public:
639
+ Derived& operator--()
488
640
  {
489
- return operator_brackets_proxy<Iterator>(iter);
641
+ iterator_core_access::decrement(this->derived());
642
+ return this->derived();
490
643
  }
491
644
 
492
- template <class Iterator>
493
- typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
645
+ Derived operator--(int)
494
646
  {
495
- return *iter;
647
+ Derived tmp(this->derived());
648
+ --*this;
649
+ return tmp;
650
+ }
651
+ };
652
+
653
+ // Implementation for random access traversal iterators
654
+ template<
655
+ typename Derived,
656
+ typename Value,
657
+ typename CategoryOrTraversal,
658
+ typename Reference,
659
+ typename Difference
660
+ >
661
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > :
662
+ public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false >
663
+ {
664
+ private:
665
+ using base_type = iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false >;
666
+
667
+ public:
668
+ using reference = typename base_type::reference;
669
+ using difference_type = typename base_type::difference_type;
670
+
671
+ public:
672
+ operator_brackets_proxy< Derived > operator[](difference_type n) const
673
+ {
674
+ return operator_brackets_proxy< Derived >(this->derived() + n);
496
675
  }
497
676
 
498
- struct choose_difference_type
677
+ Derived& operator+=(difference_type n)
499
678
  {
500
- template <class I1, class I2>
501
- struct apply
502
- :
503
- # ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
504
- iterator_difference<I1>
505
- # else
506
- mpl::eval_if<
507
- is_convertible<I2,I1>
508
- , iterator_difference<I1>
509
- , iterator_difference<I2>
510
- >
511
- # endif
512
- {};
679
+ iterator_core_access::advance(this->derived(), n);
680
+ return this->derived();
681
+ }
513
682
 
514
- };
683
+ Derived& operator-=(difference_type n)
684
+ {
685
+ iterator_core_access::advance(this->derived(), -n);
686
+ return this->derived();
687
+ }
515
688
 
516
- template <
517
- class Derived
518
- , class Value
519
- , class CategoryOrTraversal
520
- , class Reference
521
- , class Difference
522
- , bool IsBidirectionalTraversal
523
- , bool IsRandomAccessTraversal
689
+ Derived operator-(difference_type x) const
690
+ {
691
+ Derived result(this->derived());
692
+ return result -= x;
693
+ }
694
+ };
695
+
696
+ } // namespace detail
697
+
698
+ //
699
+ // iterator_facade - use as a public base class for defining new
700
+ // standard-conforming iterators.
701
+ //
702
+ template<
703
+ typename Derived, // The derived iterator type being constructed
704
+ typename Value,
705
+ typename CategoryOrTraversal,
706
+ typename Reference,
707
+ typename Difference
708
+ >
709
+ class iterator_facade :
710
+ public detail::iterator_facade_base<
711
+ Derived,
712
+ Value,
713
+ CategoryOrTraversal,
714
+ Reference,
715
+ Difference,
716
+ detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value,
717
+ detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value
524
718
  >
525
- class iterator_facade_base;
526
-
527
- } // namespace detail
528
-
529
-
530
- // Macros which describe the declarations of binary operators
531
- # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
532
- # define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
533
- template < \
534
- class Derived1, class V1, class TC1, class Reference1, class Difference1 \
535
- , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
536
- > \
537
- prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
538
- operator op( \
539
- iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
540
- , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
541
- # else
542
- # define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
543
- template < \
544
- class Derived1, class V1, class TC1, class Reference1, class Difference1 \
545
- , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
546
- > \
547
- prefix typename enabler< \
548
- Derived1, Derived2 \
549
- , typename mpl::apply2<result_type,Derived1,Derived2>::type \
550
- >::type \
551
- operator op( \
552
- iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
553
- , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
554
- # endif
719
+ {
720
+ protected:
721
+ // For use by derived classes
722
+ using iterator_facade_ = iterator_facade< Derived, Value, CategoryOrTraversal, Reference, Difference >;
723
+ };
724
+
725
+ template< typename I, typename V, typename TC, typename R, typename D >
726
+ inline typename boost::iterators::detail::postfix_increment_result< I, V, R, TC >::type
727
+ operator++(iterator_facade< I, V, TC, R, D >& i, int)
728
+ {
729
+ typename boost::iterators::detail::postfix_increment_result< I, V, R, TC >::type
730
+ tmp(*static_cast< I* >(&i));
731
+
732
+ ++i;
733
+
734
+ return tmp;
735
+ }
736
+
737
+
738
+ //
739
+ // Comparison operator implementation. The library supplied operators
740
+ // enables the user to provide fully interoperable constant/mutable
741
+ // iterator types. I.e. the library provides all operators
742
+ // for all mutable/constant iterator combinations.
743
+ //
744
+ // Note though that this kind of interoperability for constant/mutable
745
+ // iterators is not required by the standard for container iterators.
746
+ // All the standard asks for is a conversion mutable -> constant.
747
+ // Most standard library implementations nowadays provide fully interoperable
748
+ // iterator implementations, but there are still heavily used implementations
749
+ // that do not provide them. (Actually it's even worse, they do not provide
750
+ // them for only a few iterators.)
751
+ //
752
+ // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should
753
+ // enable the user to turn off mixed type operators
754
+ //
755
+ // The library takes care to provide only the right operator overloads.
756
+ // I.e.
757
+ //
758
+ // bool operator==(Iterator, Iterator);
759
+ // bool operator==(ConstIterator, Iterator);
760
+ // bool operator==(Iterator, ConstIterator);
761
+ // bool operator==(ConstIterator, ConstIterator);
762
+ //
763
+ // ...
764
+ //
765
+ // In order to do so it uses c++ idioms that are not yet widely supported
766
+ // by current compiler releases. The library is designed to degrade gracefully
767
+ // in the face of compiler deficiencies. In general compiler
768
+ // deficiencies result in less strict error checking and more obscure
769
+ // error messages, functionality is not affected.
770
+ //
771
+ // For full operation compiler support for "Substitution Failure Is Not An Error"
772
+ // (aka. enable_if) and boost::is_convertible is required.
773
+ //
774
+ // The following problems occur if support is lacking.
775
+ //
776
+ // Pseudo code
777
+ //
778
+ // ---------------
779
+ // AdaptorA<Iterator1> a1;
780
+ // AdaptorA<Iterator2> a2;
781
+ //
782
+ // // This will result in a no such overload error in full operation
783
+ // // If enable_if or is_convertible is not supported
784
+ // // The instantiation will fail with an error hopefully indicating that
785
+ // // there is no operator== for Iterator1, Iterator2
786
+ // // The same will happen if no enable_if is used to remove
787
+ // // false overloads from the templated conversion constructor
788
+ // // of AdaptorA.
789
+ //
790
+ // a1 == a2;
791
+ // ----------------
792
+ //
793
+ // AdaptorA<Iterator> a;
794
+ // AdaptorB<Iterator> b;
795
+ //
796
+ // // This will result in a no such overload error in full operation
797
+ // // If enable_if is not supported the static assert used
798
+ // // in the operator implementation will fail.
799
+ // // This will accidently work if is_convertible is not supported.
800
+ //
801
+ // a == b;
802
+ // ----------------
803
+ //
804
+
805
+ #define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \
806
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \
807
+ { \
808
+ return_prefix iterator_core_access::base_op( \
809
+ *static_cast< Derived1 const* >(&lhs), \
810
+ *static_cast< Derived2 const* >(&rhs), \
811
+ std::integral_constant< bool, std::is_convertible< Derived2, Derived1 >::value >() \
812
+ ); \
813
+ }
555
814
 
556
- # define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
557
- BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable)
815
+ #define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
816
+ BOOST_ITERATOR_FACADE_INTEROP( \
817
+ op, \
818
+ boost::iterators::detail::always_bool_t, \
819
+ return_prefix, \
820
+ base_op \
821
+ )
558
822
 
559
- # define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \
560
- BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal)
823
+ BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
824
+ BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal)
561
825
 
562
- # define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
563
- template <class Derived, class V, class TC, class R, class D> \
564
- prefix typename boost::iterators::enable_if< \
565
- boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \
566
- Derived \
567
- >::type operator+ args
826
+ #undef BOOST_ITERATOR_FACADE_RELATION
568
827
 
569
- //
570
- // Helper class for granting access to the iterator core interface.
571
- //
572
- // The simple core interface is used by iterator_facade. The core
573
- // interface of a user/library defined iterator type should not be made public
574
- // so that it does not clutter the public interface. Instead iterator_core_access
575
- // should be made friend so that iterator_facade can access the core
576
- // interface through iterator_core_access.
577
- //
578
- class iterator_core_access
579
- {
580
- # if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
581
- // Tasteless as this may seem, making all members public allows member templates
582
- // to work in the absence of member template friends.
583
- public:
584
- # else
585
-
586
- template <class I, class V, class TC, class R, class D> friend class iterator_facade;
587
- template <class I, class V, class TC, class R, class D, bool IsBidirectionalTraversal, bool IsRandomAccessTraversal>
588
- friend class detail::iterator_facade_base;
589
-
590
- # define BOOST_ITERATOR_FACADE_RELATION(op) \
591
- BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2);
592
-
593
- BOOST_ITERATOR_FACADE_RELATION(==)
594
- BOOST_ITERATOR_FACADE_RELATION(!=)
595
-
596
- # undef BOOST_ITERATOR_FACADE_RELATION
597
-
598
- # define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \
599
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2);
600
-
601
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<)
602
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>)
603
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=)
604
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=)
605
-
606
- # undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
607
-
608
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(
609
- friend, -, boost::iterators::detail::choose_difference_type)
610
- ;
611
-
612
- BOOST_ITERATOR_FACADE_PLUS_HEAD(
613
- friend inline
614
- , (iterator_facade<Derived, V, TC, R, D> const&
615
- , typename Derived::difference_type)
616
- )
617
- ;
618
-
619
- BOOST_ITERATOR_FACADE_PLUS_HEAD(
620
- friend inline
621
- , (typename Derived::difference_type
622
- , iterator_facade<Derived, V, TC, R, D> const&)
623
- )
624
- ;
625
-
626
- # endif
627
-
628
- template <class Facade>
629
- static typename Facade::reference dereference(Facade const& f)
630
- {
631
- return f.dereference();
632
- }
633
-
634
- template <class Facade>
635
- static void increment(Facade& f)
636
- {
637
- f.increment();
638
- }
639
-
640
- template <class Facade>
641
- static void decrement(Facade& f)
642
- {
643
- f.decrement();
644
- }
645
-
646
- template <class Facade1, class Facade2>
647
- static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_)
648
- {
649
- return f1.equal(f2);
650
- }
651
-
652
- template <class Facade1, class Facade2>
653
- static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_)
654
- {
655
- return f2.equal(f1);
656
- }
657
-
658
- template <class Facade>
659
- static void advance(Facade& f, typename Facade::difference_type n)
660
- {
661
- f.advance(n);
662
- }
663
-
664
- template <class Facade1, class Facade2>
665
- static typename Facade1::difference_type distance_from(
666
- Facade1 const& f1, Facade2 const& f2, mpl::true_)
667
- {
668
- return -f1.distance_to(f2);
669
- }
670
-
671
- template <class Facade1, class Facade2>
672
- static typename Facade2::difference_type distance_from(
673
- Facade1 const& f1, Facade2 const& f2, mpl::false_)
674
- {
675
- return f2.distance_to(f1);
676
- }
677
-
678
- //
679
- // Curiously Recurring Template interface.
680
- //
681
- template <class I, class V, class TC, class R, class D>
682
- static I& derived(iterator_facade<I,V,TC,R,D>& facade)
683
- {
684
- return *static_cast<I*>(&facade);
685
- }
686
-
687
- template <class I, class V, class TC, class R, class D>
688
- static I const& derived(iterator_facade<I,V,TC,R,D> const& facade)
689
- {
690
- return *static_cast<I const*>(&facade);
691
- }
692
-
693
- // objects of this class are useless
694
- BOOST_DELETED_FUNCTION(iterator_core_access())
695
- };
696
-
697
- namespace detail {
698
-
699
- // Implementation for forward traversal iterators
700
- template <
701
- class Derived
702
- , class Value
703
- , class CategoryOrTraversal
704
- , class Reference
705
- , class Difference
706
- >
707
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
708
- # ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
709
- : public boost::iterators::detail::iterator_facade_types<
710
- Value, CategoryOrTraversal, Reference, Difference
711
- >::base
712
- # undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
713
- # endif
714
- {
715
- private:
716
- typedef boost::iterators::detail::iterator_facade_types<
717
- Value, CategoryOrTraversal, Reference, Difference
718
- > associated_types;
719
-
720
- typedef boost::iterators::detail::operator_arrow_dispatch<
721
- Reference
722
- , typename associated_types::pointer
723
- > operator_arrow_dispatch_;
724
-
725
- public:
726
- typedef typename associated_types::value_type value_type;
727
- typedef Reference reference;
728
- typedef Difference difference_type;
729
-
730
- typedef typename operator_arrow_dispatch_::result_type pointer;
731
-
732
- typedef typename associated_types::iterator_category iterator_category;
733
-
734
- public:
735
- reference operator*() const
736
- {
737
- return iterator_core_access::dereference(this->derived());
738
- }
739
-
740
- pointer operator->() const
741
- {
742
- return operator_arrow_dispatch_::apply(*this->derived());
743
- }
744
-
745
- Derived& operator++()
746
- {
747
- iterator_core_access::increment(this->derived());
748
- return this->derived();
749
- }
750
-
751
- protected:
752
- //
753
- // Curiously Recurring Template interface.
754
- //
755
- Derived& derived()
756
- {
757
- return *static_cast<Derived*>(this);
758
- }
759
-
760
- Derived const& derived() const
761
- {
762
- return *static_cast<Derived const*>(this);
763
- }
764
- };
765
828
 
766
- // Implementation for bidirectional traversal iterators
767
- template <
768
- class Derived
769
- , class Value
770
- , class CategoryOrTraversal
771
- , class Reference
772
- , class Difference
773
- >
774
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > :
775
- public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
776
- {
777
- public:
778
- Derived& operator--()
779
- {
780
- iterator_core_access::decrement(this->derived());
781
- return this->derived();
782
- }
783
-
784
- Derived operator--(int)
785
- {
786
- Derived tmp(this->derived());
787
- --*this;
788
- return tmp;
789
- }
790
- };
829
+ #define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \
830
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \
831
+ { \
832
+ return_prefix iterator_core_access::base_op( \
833
+ *static_cast< Derived1 const* >(&lhs), \
834
+ *static_cast< Derived2 const* >(&rhs), \
835
+ std::integral_constant< bool, std::is_convertible< Derived2, Derived1 >::value >() \
836
+ ); \
837
+ }
791
838
 
792
- // Implementation for random access traversal iterators
793
- template <
794
- class Derived
795
- , class Value
796
- , class CategoryOrTraversal
797
- , class Reference
798
- , class Difference
799
- >
800
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > :
801
- public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false >
802
- {
803
- private:
804
- typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type;
805
-
806
- public:
807
- typedef typename base_type::reference reference;
808
- typedef typename base_type::difference_type difference_type;
809
-
810
- public:
811
- typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
812
- operator[](difference_type n) const
813
- {
814
- typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy;
815
-
816
- return boost::iterators::detail::make_operator_brackets_result<Derived>(
817
- this->derived() + n
818
- , use_proxy()
819
- );
820
- }
821
-
822
- Derived& operator+=(difference_type n)
823
- {
824
- iterator_core_access::advance(this->derived(), n);
825
- return this->derived();
826
- }
827
-
828
- Derived& operator-=(difference_type n)
829
- {
830
- iterator_core_access::advance(this->derived(), -n);
831
- return this->derived();
832
- }
833
-
834
- Derived operator-(difference_type x) const
835
- {
836
- Derived result(this->derived());
837
- return result -= x;
838
- }
839
- };
839
+ #define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \
840
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \
841
+ op, \
842
+ boost::iterators::detail::always_bool_t, \
843
+ return_prefix, \
844
+ base_op \
845
+ )
846
+
847
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from)
848
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from)
849
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from)
850
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from)
851
+
852
+ #undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
853
+
854
+ // operator- requires an additional part in the static assertion
855
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(
856
+ -,
857
+ boost::iterators::detail::choose_difference_type_t,
858
+ return,
859
+ distance_from
860
+ )
861
+
862
+ #undef BOOST_ITERATOR_FACADE_INTEROP
863
+ #undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS
864
+
865
+ #define BOOST_ITERATOR_FACADE_PLUS(args) \
866
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \
867
+ { \
868
+ Derived tmp(static_cast< Derived const& >(i)); \
869
+ return tmp += n; \
870
+ }
871
+
872
+ BOOST_ITERATOR_FACADE_PLUS((iterator_facade< Derived, V, TC, R, D > const& i, typename Derived::difference_type n))
873
+ BOOST_ITERATOR_FACADE_PLUS((typename Derived::difference_type n, iterator_facade< Derived, V, TC, R, D > const& i))
840
874
 
841
- } // namespace detail
842
-
843
- //
844
- // iterator_facade - use as a public base class for defining new
845
- // standard-conforming iterators.
846
- //
847
- template <
848
- class Derived // The derived iterator type being constructed
849
- , class Value
850
- , class CategoryOrTraversal
851
- , class Reference = Value&
852
- , class Difference = std::ptrdiff_t
853
- >
854
- class iterator_facade :
855
- public detail::iterator_facade_base<
856
- Derived,
857
- Value,
858
- CategoryOrTraversal,
859
- Reference,
860
- Difference,
861
- detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value,
862
- detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value
863
- >
864
- {
865
- protected:
866
- // For use by derived classes
867
- typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
868
- };
869
-
870
- template <class I, class V, class TC, class R, class D>
871
- inline typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
872
- operator++(
873
- iterator_facade<I,V,TC,R,D>& i
874
- , int
875
- )
876
- {
877
- typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
878
- tmp(*static_cast<I*>(&i));
879
-
880
- ++i;
881
-
882
- return tmp;
883
- }
884
-
885
-
886
- //
887
- // Comparison operator implementation. The library supplied operators
888
- // enables the user to provide fully interoperable constant/mutable
889
- // iterator types. I.e. the library provides all operators
890
- // for all mutable/constant iterator combinations.
891
- //
892
- // Note though that this kind of interoperability for constant/mutable
893
- // iterators is not required by the standard for container iterators.
894
- // All the standard asks for is a conversion mutable -> constant.
895
- // Most standard library implementations nowadays provide fully interoperable
896
- // iterator implementations, but there are still heavily used implementations
897
- // that do not provide them. (Actually it's even worse, they do not provide
898
- // them for only a few iterators.)
899
- //
900
- // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should
901
- // enable the user to turn off mixed type operators
902
- //
903
- // The library takes care to provide only the right operator overloads.
904
- // I.e.
905
- //
906
- // bool operator==(Iterator, Iterator);
907
- // bool operator==(ConstIterator, Iterator);
908
- // bool operator==(Iterator, ConstIterator);
909
- // bool operator==(ConstIterator, ConstIterator);
910
- //
911
- // ...
912
- //
913
- // In order to do so it uses c++ idioms that are not yet widely supported
914
- // by current compiler releases. The library is designed to degrade gracefully
915
- // in the face of compiler deficiencies. In general compiler
916
- // deficiencies result in less strict error checking and more obscure
917
- // error messages, functionality is not affected.
918
- //
919
- // For full operation compiler support for "Substitution Failure Is Not An Error"
920
- // (aka. enable_if) and boost::is_convertible is required.
921
- //
922
- // The following problems occur if support is lacking.
923
- //
924
- // Pseudo code
925
- //
926
- // ---------------
927
- // AdaptorA<Iterator1> a1;
928
- // AdaptorA<Iterator2> a2;
929
- //
930
- // // This will result in a no such overload error in full operation
931
- // // If enable_if or is_convertible is not supported
932
- // // The instantiation will fail with an error hopefully indicating that
933
- // // there is no operator== for Iterator1, Iterator2
934
- // // The same will happen if no enable_if is used to remove
935
- // // false overloads from the templated conversion constructor
936
- // // of AdaptorA.
937
- //
938
- // a1 == a2;
939
- // ----------------
940
- //
941
- // AdaptorA<Iterator> a;
942
- // AdaptorB<Iterator> b;
943
- //
944
- // // This will result in a no such overload error in full operation
945
- // // If enable_if is not supported the static assert used
946
- // // in the operator implementation will fail.
947
- // // This will accidently work if is_convertible is not supported.
948
- //
949
- // a == b;
950
- // ----------------
951
- //
952
-
953
- # ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
954
- # define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_()
955
- # else
956
- # define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible<a,b>()
957
- # endif
958
-
959
- # define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \
960
- BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \
961
- { \
962
- /* For those compilers that do not support enable_if */ \
963
- BOOST_STATIC_ASSERT(( \
964
- is_interoperable< Derived1, Derived2 >::value \
965
- )); \
966
- return_prefix iterator_core_access::base_op( \
967
- *static_cast<Derived1 const*>(&lhs) \
968
- , *static_cast<Derived2 const*>(&rhs) \
969
- , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
970
- ); \
971
- }
972
-
973
- # define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
974
- BOOST_ITERATOR_FACADE_INTEROP( \
975
- op \
976
- , boost::iterators::detail::always_bool2 \
977
- , return_prefix \
978
- , base_op \
979
- )
980
-
981
- BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
982
- BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal)
983
-
984
- # undef BOOST_ITERATOR_FACADE_RELATION
985
-
986
-
987
- # define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \
988
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \
989
- { \
990
- /* For those compilers that do not support enable_if */ \
991
- BOOST_STATIC_ASSERT(( \
992
- is_interoperable< Derived1, Derived2 >::value && \
993
- boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \
994
- boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \
995
- )); \
996
- return_prefix iterator_core_access::base_op( \
997
- *static_cast<Derived1 const*>(&lhs) \
998
- , *static_cast<Derived2 const*>(&rhs) \
999
- , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
1000
- ); \
1001
- }
1002
-
1003
- # define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \
1004
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \
1005
- op \
1006
- , boost::iterators::detail::always_bool2 \
1007
- , return_prefix \
1008
- , base_op \
1009
- )
1010
-
1011
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from)
1012
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from)
1013
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from)
1014
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from)
1015
-
1016
- # undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
1017
-
1018
- // operator- requires an additional part in the static assertion
1019
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(
1020
- -
1021
- , boost::iterators::detail::choose_difference_type
1022
- , return
1023
- , distance_from
1024
- )
1025
-
1026
- # undef BOOST_ITERATOR_FACADE_INTEROP
1027
- # undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS
1028
-
1029
- # define BOOST_ITERATOR_FACADE_PLUS(args) \
1030
- BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \
1031
- { \
1032
- Derived tmp(static_cast<Derived const&>(i)); \
1033
- return tmp += n; \
1034
- }
1035
-
1036
- BOOST_ITERATOR_FACADE_PLUS((
1037
- iterator_facade<Derived, V, TC, R, D> const& i
1038
- , typename Derived::difference_type n
1039
- ))
1040
-
1041
- BOOST_ITERATOR_FACADE_PLUS((
1042
- typename Derived::difference_type n
1043
- , iterator_facade<Derived, V, TC, R, D> const& i
1044
- ))
1045
-
1046
- # undef BOOST_ITERATOR_FACADE_PLUS
1047
- # undef BOOST_ITERATOR_FACADE_PLUS_HEAD
1048
-
1049
- # undef BOOST_ITERATOR_FACADE_INTEROP_HEAD
1050
- # undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD
1051
- # undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL
875
+ #undef BOOST_ITERATOR_FACADE_PLUS
876
+ #undef BOOST_ITERATOR_FACADE_PLUS_HEAD
877
+
878
+ #undef BOOST_ITERATOR_FACADE_INTEROP_HEAD
879
+ #undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD
880
+ #undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL
1052
881
 
1053
882
  } // namespace iterators
1054
883
 
@@ -1057,6 +886,4 @@ using iterators::iterator_facade;
1057
886
 
1058
887
  } // namespace boost
1059
888
 
1060
- #include <boost/iterator/detail/config_undef.hpp>
1061
-
1062
889
  #endif // BOOST_ITERATOR_FACADE_23022003THW_HPP