passenger 5.0.24 → 5.0.25

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

Potentially problematic release.


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

Files changed (1796) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +8 -18
  3. data/CHANGELOG +20 -0
  4. data/build/cplusplus_support.rb +3 -3
  5. data/build/cxx_dependency_map.rb +148 -96
  6. data/build/cxx_tests.rb +24 -12
  7. data/build/packaging.rb +1 -2
  8. data/dev/copy_boost_headers +32 -9
  9. data/resources/templates/standalone/config.erb +2 -0
  10. data/resources/templates/standalone/footer.erb +3 -0
  11. data/resources/templates/standalone/server.erb +7 -0
  12. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +2 -2
  13. data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -0
  14. data/src/agent/Core/UnionStation/Transaction.h +1 -15
  15. data/src/agent/README.md +15 -3
  16. data/src/agent/UstRouter/Controller.h +95 -90
  17. data/src/agent/UstRouter/FileSink.h +3 -2
  18. data/src/agent/UstRouter/LogSink.h +5 -6
  19. data/src/agent/UstRouter/RemoteSender.h +41 -12
  20. data/src/agent/UstRouter/RemoteSink.h +3 -2
  21. data/src/agent/UstRouter/Transaction.h +198 -66
  22. data/src/apache2_module/Configuration.cpp +57 -2
  23. data/src/apache2_module/Configuration.h +3 -1
  24. data/src/apache2_module/Configuration.hpp +3 -1
  25. data/src/apache2_module/Hooks.cpp +4 -2
  26. data/src/cxx_supportlib/Constants.h +1 -1
  27. data/src/cxx_supportlib/MemoryKit/palloc.h +1 -0
  28. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -0
  29. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +4 -3
  30. data/src/cxx_supportlib/ServerKit/Server.h +1 -0
  31. data/src/cxx_supportlib/Utils/BufferedIO.h +21 -4
  32. data/src/cxx_supportlib/Utils/IOUtils.cpp +62 -12
  33. data/src/cxx_supportlib/Utils/StrIntUtils.cpp +3 -3
  34. data/src/cxx_supportlib/Utils/StrIntUtils.h +2 -2
  35. data/src/cxx_supportlib/WatchdogLauncher.cpp +13 -1
  36. data/src/cxx_supportlib/WatchdogLauncher.h +4 -1
  37. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/classification.hpp +312 -0
  38. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/concept.hpp +1 -1
  39. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/classification.hpp +353 -0
  40. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format.hpp +1 -1
  41. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format_all.hpp +1 -1
  42. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format_store.hpp +1 -1
  43. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_iterator.hpp +87 -0
  44. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/finder.hpp +1 -8
  45. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/finder_regex.hpp +122 -0
  46. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter.hpp +1 -1
  47. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp +61 -0
  48. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/predicate.hpp +77 -0
  49. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/trim.hpp +95 -0
  50. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/util.hpp +1 -1
  51. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/erase.hpp +1 -1
  52. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find.hpp +334 -0
  53. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find_format.hpp +1 -1
  54. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find_iterator.hpp +388 -0
  55. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/finder.hpp +1 -1
  56. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +1 -1
  57. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/iter_find.hpp +193 -0
  58. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/join.hpp +145 -0
  59. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/predicate.hpp +475 -0
  60. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/predicate_facade.hpp +42 -0
  61. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/regex.hpp +646 -0
  62. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/regex_find_format.hpp +90 -0
  63. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +1 -1
  64. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/sequence_traits.hpp +0 -73
  65. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/split.hpp +163 -0
  66. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/list_traits.hpp +68 -0
  67. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/rope_traits.hpp +81 -0
  68. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/slist_traits.hpp +69 -0
  69. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/string_traits.hpp +44 -0
  70. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std_containers_traits.hpp +26 -0
  71. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim.hpp +398 -0
  72. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp +217 -0
  73. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +20 -0
  74. data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +29 -0
  75. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +40 -0
  76. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +22 -0
  77. data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +29 -0
  78. data/src/cxx_supportlib/vendor-modified/boost/aligned_storage.hpp +1 -164
  79. data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +33 -84
  80. data/src/cxx_supportlib/vendor-modified/boost/atomic.hpp +1 -1
  81. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +83 -231
  82. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_flag.hpp +33 -0
  83. data/src/cxx_supportlib/vendor-modified/boost/atomic/capabilities.hpp +161 -0
  84. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag.hpp +70 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +774 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +53 -0
  87. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_alpha.hpp +34 -0
  88. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_arm.hpp +56 -0
  89. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_atomic.hpp +134 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_ppc.hpp +36 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sparc.hpp +34 -0
  92. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sync.hpp +62 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +52 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_linux_arm.hpp +35 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_arm.hpp +34 -0
  96. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +50 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +57 -36
  98. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +140 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +297 -16
  100. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/link.hpp +58 -0
  101. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lockpool.hpp +30 -76
  102. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations.hpp +24 -0
  103. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_fwd.hpp +35 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_lockfree.hpp +30 -0
  105. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_cas_based.hpp +105 -0
  106. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +161 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_extending_cas_based.hpp +68 -0
  108. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +876 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +973 -0
  110. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +395 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +802 -0
  112. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +240 -0
  113. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +270 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +514 -0
  115. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +616 -0
  116. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +178 -0
  117. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +824 -0
  118. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_common.hpp +38 -0
  119. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +928 -0
  120. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +43 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +91 -32
  122. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_type.hpp +280 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/atomic/fences.hpp +67 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/bind.hpp +18 -1
  125. data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +74 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +5 -5
  127. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +507 -2
  128. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +214 -0
  129. data/src/cxx_supportlib/vendor-modified/boost/bind/make_adaptable.hpp +187 -0
  130. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_vw.hpp +130 -0
  131. data/src/cxx_supportlib/vendor-modified/boost/bind/placeholders.hpp +29 -36
  132. data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +304 -0
  133. data/src/cxx_supportlib/vendor-modified/boost/checked_delete.hpp +13 -65
  134. data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +9 -13
  135. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +10 -4
  136. data/src/cxx_supportlib/vendor-modified/boost/concept/assert.hpp +1 -2
  137. data/src/cxx_supportlib/vendor-modified/boost/concept/detail/concept_def.hpp +0 -17
  138. data/src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp +3 -1
  139. data/src/cxx_supportlib/vendor-modified/boost/concept/usage.hpp +0 -8
  140. data/src/cxx_supportlib/vendor-modified/boost/concept_check.hpp +25 -26
  141. data/src/cxx_supportlib/vendor-modified/boost/config.hpp +9 -12
  142. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +17 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +36 -6
  144. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +135 -14
  145. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +41 -1
  146. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +48 -9
  147. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +33 -5
  148. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +36 -16
  149. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +121 -87
  150. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +39 -5
  151. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +13 -9
  152. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +327 -64
  153. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +44 -10
  154. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +38 -4
  155. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +0 -12
  156. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +36 -3
  157. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +37 -1
  158. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +63 -23
  159. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +44 -13
  160. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +102 -128
  161. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +258 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cloudabi.hpp +18 -0
  163. data/src/cxx_supportlib/vendor-modified/boost/config/platform/haiku.hpp +31 -0
  164. data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +2 -0
  165. data/src/cxx_supportlib/vendor-modified/boost/config/platform/macos.hpp +1 -1
  166. data/src/cxx_supportlib/vendor-modified/boost/config/platform/solaris.hpp +4 -1
  167. data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +43 -7
  168. data/src/cxx_supportlib/vendor-modified/boost/config/select_platform_config.hpp +32 -0
  169. data/src/cxx_supportlib/vendor-modified/boost/config/select_stdlib_config.hpp +28 -8
  170. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +58 -15
  171. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +13 -2
  172. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +43 -0
  173. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +129 -14
  174. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +13 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +13 -9
  176. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +12 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +14 -4
  178. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +13 -8
  179. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +13 -3
  180. data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +159 -85
  181. data/src/cxx_supportlib/vendor-modified/boost/config/user.hpp +15 -6
  182. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +351 -0
  183. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +371 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +283 -213
  185. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +195 -51
  186. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +840 -625
  187. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +166 -0
  188. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +24 -13
  189. data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +41 -0
  190. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +289 -181
  191. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +35 -0
  192. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +60 -0
  193. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +314 -0
  194. data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocation_type.hpp +11 -7
  195. data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +24 -25
  196. data/src/cxx_supportlib/vendor-modified/boost/container/detail/auto_link.hpp +51 -0
  197. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_list.hpp +139 -0
  198. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_slist.hpp +157 -0
  199. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +74 -0
  200. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +16 -14
  201. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +1 -5
  202. data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +62 -0
  203. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +1142 -0
  204. data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +61 -48
  205. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +293 -0
  206. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dlmalloc.hpp +103 -0
  207. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +335 -408
  208. data/src/cxx_supportlib/vendor-modified/boost/container/detail/function_detector.hpp +9 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +383 -0
  210. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +40 -0
  211. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator_to_raw_pointer.hpp +58 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +300 -83
  213. data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +13 -3
  214. data/src/cxx_supportlib/vendor-modified/boost/container/detail/min_max.hpp +37 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/container/detail/minimal_char_traits_header.hpp +32 -0
  216. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +45 -118
  217. data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +22 -10
  218. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +288 -0
  219. data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +75 -0
  220. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +115 -109
  221. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +157 -0
  222. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +33 -23
  223. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +62 -89
  224. data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +30 -0
  225. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common.hpp +11 -6
  226. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +102 -0
  227. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_resource.hpp +191 -0
  228. data/src/cxx_supportlib/vendor-modified/boost/container/detail/singleton.hpp +121 -0
  229. data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +56 -0
  230. data/src/cxx_supportlib/vendor-modified/boost/container/detail/to_raw_pointer.hpp +33 -0
  231. data/src/cxx_supportlib/vendor-modified/boost/container/detail/transform_iterator.hpp +17 -13
  232. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +646 -595
  233. data/src/cxx_supportlib/vendor-modified/boost/container/detail/type_traits.hpp +44 -184
  234. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +7 -3
  235. data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +9 -4
  236. data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +23 -5
  237. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +50 -15
  238. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +627 -287
  239. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +608 -657
  240. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +395 -376
  241. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +616 -625
  242. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +179 -0
  243. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +344 -0
  244. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +80 -0
  245. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +43 -0
  246. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +63 -0
  247. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +59 -0
  248. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +66 -0
  249. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +43 -0
  250. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +63 -0
  251. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +101 -0
  252. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +180 -0
  253. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +166 -0
  254. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/pool_options.hpp +52 -0
  255. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +193 -0
  256. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +59 -0
  257. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +43 -0
  258. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +43 -0
  259. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +43 -0
  260. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +48 -0
  261. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/synchronized_pool_resource.hpp +138 -0
  262. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/unsynchronized_pool_resource.hpp +194 -0
  263. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +43 -0
  264. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +423 -1019
  265. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator_fwd.hpp +23 -35
  266. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +520 -626
  267. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +416 -407
  268. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +574 -0
  269. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +711 -470
  270. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +314 -145
  271. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +477 -282
  272. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +63 -3
  273. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +169 -0
  274. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +73 -0
  275. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +1660 -945
  276. data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +162 -0
  277. data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +69 -0
  278. data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +128 -0
  279. data/src/cxx_supportlib/vendor-modified/boost/core/enable_if.hpp +128 -0
  280. data/src/cxx_supportlib/vendor-modified/boost/core/explicit_operator_bool.hpp +154 -0
  281. data/src/cxx_supportlib/vendor-modified/boost/core/ignore_unused.hpp +70 -0
  282. data/src/cxx_supportlib/vendor-modified/boost/core/is_same.hpp +40 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +171 -0
  284. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +56 -0
  285. data/src/cxx_supportlib/vendor-modified/boost/core/no_exceptions_support.hpp +44 -0
  286. data/src/cxx_supportlib/vendor-modified/boost/core/noncopyable.hpp +48 -0
  287. data/src/cxx_supportlib/vendor-modified/boost/core/null_deleter.hpp +44 -0
  288. data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +301 -0
  289. data/src/cxx_supportlib/vendor-modified/boost/{detail/scoped_enum_emulation.hpp → core/scoped_enum.hpp} +19 -164
  290. data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +60 -0
  291. data/src/cxx_supportlib/vendor-modified/boost/core/typeinfo.hpp +151 -0
  292. data/src/cxx_supportlib/vendor-modified/boost/core/underlying_type.hpp +79 -0
  293. data/src/cxx_supportlib/vendor-modified/boost/cstdint.hpp +132 -95
  294. data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +8 -5
  295. data/src/cxx_supportlib/vendor-modified/boost/date_time/adjust_functors.hpp +1 -1
  296. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_local_time_adjustor.hpp +69 -0
  297. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +3 -3
  298. data/src/cxx_supportlib/vendor-modified/boost/date_time/compiler_config.hpp +1 -1
  299. data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +1 -1
  300. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +3 -3
  301. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_clock_device.hpp +7 -7
  302. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_defs.hpp +1 -1
  303. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +1 -1
  304. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +1 -1
  305. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +1 -1
  306. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_format_simple.hpp +1 -1
  307. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting.hpp +1 -1
  308. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting_limited.hpp +1 -1
  309. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting_locales.hpp +1 -1
  310. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generator_formatter.hpp +1 -1
  311. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generator_parser.hpp +1 -1
  312. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generators.hpp +1 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_iterator.hpp +1 -1
  314. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +1 -1
  315. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_parsing.hpp +1 -3
  316. data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_rules.hpp +1 -1
  317. data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_transition_generators.hpp +75 -0
  318. data/src/cxx_supportlib/vendor-modified/boost/date_time/filetime_functions.hpp +1 -1
  319. data/src/cxx_supportlib/vendor-modified/boost/date_time/format_date_parser.hpp +11 -7
  320. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/conversion.hpp +1 -1
  321. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters.hpp +1 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters_limited.hpp +1 -1
  323. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +1 -1
  324. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +1 -1
  325. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +1 -1
  326. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +1 -1
  327. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +1 -1
  328. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +1 -1
  329. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +352 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +1 -1
  331. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +517 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +1 -1
  333. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +1 -1
  334. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_ymd.hpp +1 -1
  335. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian.hpp +1 -1
  336. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian_io.hpp +1 -1
  337. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian_types.hpp +1 -1
  338. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +1 -1
  339. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +1 -1
  340. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +6 -6
  341. data/src/cxx_supportlib/vendor-modified/boost/date_time/int_adapter.hpp +3 -3
  342. data/src/cxx_supportlib/vendor-modified/boost/date_time/iso_format.hpp +1 -1
  343. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/conversion.hpp +34 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/custom_time_zone.hpp +169 -0
  345. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/date_duration_operators.hpp +115 -0
  346. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/dst_transition_day_rules.hpp +77 -0
  347. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +528 -0
  348. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time.hpp +24 -0
  349. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time_io.hpp +184 -0
  350. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time_types.hpp +52 -0
  351. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +474 -0
  352. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/tz_database.hpp +32 -0
  353. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time_adjustor.hpp +218 -0
  354. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_timezone_defs.hpp +193 -0
  355. data/src/cxx_supportlib/vendor-modified/boost/date_time/locale_config.hpp +1 -1
  356. data/src/cxx_supportlib/vendor-modified/boost/date_time/microsec_time_clock.hpp +2 -2
  357. data/src/cxx_supportlib/vendor-modified/boost/date_time/parse_format_base.hpp +1 -1
  358. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +1 -1
  359. data/src/cxx_supportlib/vendor-modified/boost/date_time/period_formatter.hpp +1 -1
  360. data/src/cxx_supportlib/vendor-modified/boost/date_time/period_parser.hpp +1 -1
  361. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/conversion.hpp +9 -1
  362. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +1 -1
  363. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time.hpp +1 -1
  364. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +1 -1
  365. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +4 -4
  366. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_io.hpp +1 -4
  367. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_legacy_io.hpp +153 -0
  368. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_system.hpp +1 -1
  369. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +1 -1
  370. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters.hpp +1 -1
  371. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters_limited.hpp +212 -0
  372. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +1 -1
  373. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_period.hpp +1 -1
  374. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_serialize.hpp +201 -0
  375. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_defs.hpp +1 -1
  376. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_formatter.hpp +1 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/date_time/string_convert.hpp +1 -2
  378. data/src/cxx_supportlib/vendor-modified/boost/date_time/string_parse_tree.hpp +1 -1
  379. data/src/cxx_supportlib/vendor-modified/boost/date_time/strings_from_facet.hpp +1 -3
  380. data/src/cxx_supportlib/vendor-modified/boost/date_time/time.hpp +3 -1
  381. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_clock.hpp +1 -1
  382. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_defs.hpp +1 -1
  383. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +3 -1
  384. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +3 -3
  385. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_formatting_streams.hpp +1 -1
  386. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_iterator.hpp +1 -1
  387. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +1 -1
  388. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_resolution_traits.hpp +6 -6
  389. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_counted.hpp +2 -2
  390. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_split.hpp +1 -1
  391. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +99 -0
  392. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_names.hpp +98 -0
  393. data/src/cxx_supportlib/vendor-modified/boost/date_time/tz_db_base.hpp +396 -0
  394. data/src/cxx_supportlib/vendor-modified/boost/date_time/wrapping_int.hpp +1 -1
  395. data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +1 -1
  396. data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +139 -0
  397. data/src/cxx_supportlib/vendor-modified/boost/detail/container_fwd.hpp +1 -6
  398. data/src/cxx_supportlib/vendor-modified/boost/detail/endian.hpp +3 -118
  399. data/src/cxx_supportlib/vendor-modified/boost/detail/fenv.hpp +30 -3
  400. data/src/cxx_supportlib/vendor-modified/boost/detail/indirect_traits.hpp +0 -283
  401. data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +9 -477
  402. data/src/cxx_supportlib/vendor-modified/boost/detail/no_exceptions_support.hpp +12 -82
  403. data/src/cxx_supportlib/vendor-modified/boost/detail/reference_content.hpp +0 -21
  404. data/src/cxx_supportlib/vendor-modified/boost/detail/sp_typeinfo.hpp +8 -107
  405. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/clone_current_exception.hpp +10 -1
  406. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +8 -3
  407. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +7 -9
  408. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +2 -2
  409. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +16 -0
  410. data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +11 -12
  411. data/src/cxx_supportlib/vendor-modified/boost/function/detail/gen_maybe_include.pl +37 -0
  412. data/src/cxx_supportlib/vendor-modified/boost/function/function0.hpp +12 -0
  413. data/src/cxx_supportlib/vendor-modified/boost/function/function1.hpp +12 -0
  414. data/src/cxx_supportlib/vendor-modified/boost/function/function10.hpp +12 -0
  415. data/src/cxx_supportlib/vendor-modified/boost/function/function2.hpp +12 -0
  416. data/src/cxx_supportlib/vendor-modified/boost/function/function3.hpp +12 -0
  417. data/src/cxx_supportlib/vendor-modified/boost/function/function4.hpp +12 -0
  418. data/src/cxx_supportlib/vendor-modified/boost/function/function5.hpp +12 -0
  419. data/src/cxx_supportlib/vendor-modified/boost/function/function6.hpp +12 -0
  420. data/src/cxx_supportlib/vendor-modified/boost/function/function7.hpp +12 -0
  421. data/src/cxx_supportlib/vendor-modified/boost/function/function8.hpp +12 -0
  422. data/src/cxx_supportlib/vendor-modified/boost/function/function9.hpp +12 -0
  423. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +6 -24
  424. data/src/cxx_supportlib/vendor-modified/boost/function/function_fwd.hpp +1 -2
  425. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +35 -30
  426. data/src/cxx_supportlib/vendor-modified/boost/function/function_typeof.hpp +45 -0
  427. data/src/cxx_supportlib/vendor-modified/boost/function/gen_function_N.pl +26 -0
  428. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/float_functions.hpp +4 -4
  429. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +22 -28
  430. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/limits.hpp +3 -2
  431. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +5 -66
  432. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +77 -48
  433. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash_fwd.hpp +3 -7
  434. data/src/cxx_supportlib/vendor-modified/boost/functional/hash_fwd.hpp +5 -1
  435. data/src/cxx_supportlib/vendor-modified/boost/get_pointer.hpp +28 -0
  436. data/src/cxx_supportlib/vendor-modified/boost/integer.hpp +25 -24
  437. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_ct.hpp +102 -0
  438. data/src/cxx_supportlib/vendor-modified/boost/integer_fwd.hpp +23 -0
  439. data/src/cxx_supportlib/vendor-modified/boost/integer_traits.hpp +1 -6
  440. data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +47 -55
  441. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +655 -2197
  442. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +16 -22
  443. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +376 -1605
  444. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +329 -601
  445. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +982 -0
  446. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +17 -27
  447. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +2101 -0
  448. data/src/cxx_supportlib/vendor-modified/boost/intrusive/{detail/tree_algorithms.hpp → bstree_algorithms.hpp} +973 -684
  449. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +121 -66
  450. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +30 -28
  451. data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +22 -15
  452. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +50 -0
  453. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algorithm.hpp +90 -0
  454. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +48 -61
  455. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +95 -0
  456. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/assert.hpp +6 -2
  457. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +19 -24
  458. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +184 -0
  459. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +104 -8
  460. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +2 -3
  461. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_end.hpp +1 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +69 -0
  463. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +235 -39
  464. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/empty_node_checker.hpp +44 -0
  465. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +48 -0
  466. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +88 -0
  467. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/function_detector.hpp +8 -4
  468. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +107 -95
  469. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/get_value_traits.hpp +222 -0
  470. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +279 -296
  471. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +122 -85
  472. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +186 -0
  473. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +121 -0
  474. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/is_stateful_value_traits.hpp +9 -5
  475. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +155 -0
  476. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +99 -0
  477. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +133 -0
  478. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +14 -139
  479. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/math.hpp +295 -0
  480. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/minimal_less_equal_header.hpp +30 -0
  481. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/minimal_pair_header.hpp +30 -0
  482. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/mpl.hpp +160 -337
  483. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_cloner_disposer.hpp +105 -0
  484. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_holder.hpp +35 -0
  485. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_to_value.hpp +130 -0
  486. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +34 -11
  487. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/pointer_element.hpp +168 -0
  488. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +22 -19
  489. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +144 -0
  490. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/simple_disposers.hpp +50 -0
  491. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +84 -0
  492. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +124 -0
  493. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +14 -117
  494. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/std_fwd.hpp +43 -0
  495. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +46 -0
  496. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +18 -20
  497. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +171 -0
  498. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +13 -133
  499. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +89 -0
  500. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/uncast.hpp +55 -0
  501. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +22 -6
  502. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +2006 -1615
  503. data/src/cxx_supportlib/vendor-modified/boost/intrusive/intrusive_fwd.hpp +450 -229
  504. data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +17 -2
  505. data/src/cxx_supportlib/vendor-modified/boost/intrusive/link_mode.hpp +21 -4
  506. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +253 -282
  507. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +17 -20
  508. data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +21 -7
  509. data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +94 -648
  510. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +374 -0
  511. data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +10 -4
  512. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +16 -8
  513. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_rebind.hpp +188 -0
  514. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +97 -44
  515. data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +29 -4
  516. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +366 -1592
  517. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +297 -639
  518. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +619 -2187
  519. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +16 -22
  520. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +661 -2252
  521. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +468 -1493
  522. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +163 -594
  523. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +326 -307
  524. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +16 -21
  525. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +686 -2238
  526. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +425 -1575
  527. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +422 -703
  528. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +440 -1122
  529. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +158 -406
  530. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +558 -2257
  531. data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +14 -2
  532. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +476 -1611
  533. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +36 -27
  534. data/src/cxx_supportlib/vendor-modified/boost/iterator.hpp +3 -42
  535. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_def.hpp +4 -13
  536. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_undef.hpp +0 -1
  537. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/enable_if.hpp +2 -5
  538. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +15 -22
  539. data/src/cxx_supportlib/vendor-modified/boost/iterator/interoperable.hpp +8 -4
  540. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +59 -64
  541. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_categories.hpp +77 -50
  542. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +13 -22
  543. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +318 -212
  544. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_traits.hpp +17 -49
  545. data/src/cxx_supportlib/vendor-modified/boost/iterator/{detail/minimum_category.hpp → minimum_category.hpp} +24 -45
  546. data/src/cxx_supportlib/vendor-modified/boost/iterator/reverse_iterator.hpp +10 -5
  547. data/src/cxx_supportlib/vendor-modified/boost/iterator/transform_iterator.hpp +17 -18
  548. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +29 -2649
  549. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +101 -0
  550. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +498 -0
  551. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +787 -0
  552. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +194 -0
  553. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +197 -0
  554. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +58 -0
  555. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +46 -0
  556. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +294 -0
  557. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +40 -0
  558. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +212 -0
  559. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/c_regex_traits.cpp +24 -11
  560. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cpp_regex_traits.cpp +3 -3
  561. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cregex.cpp +40 -40
  562. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +14 -17
  563. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -3
  564. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_raw_buffer.cpp +3 -3
  565. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_traits_defaults.cpp +2 -2
  566. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +8 -4
  567. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wc_regex_traits.cpp +24 -11
  568. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +11 -14
  569. data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/error_code.cpp +3 -420
  570. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp +2 -1
  571. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +3 -5
  572. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +0 -6
  573. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +173 -77
  574. data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +83 -33
  575. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/fp_traits.hpp +11 -1
  576. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +42 -12
  577. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +196 -18
  578. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/sign.hpp +52 -8
  579. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +111 -13
  580. data/src/cxx_supportlib/vendor-modified/boost/math/tools/promotion.hpp +40 -8
  581. data/src/cxx_supportlib/vendor-modified/boost/math/tools/real_cast.hpp +3 -1
  582. data/src/cxx_supportlib/vendor-modified/boost/math/tools/user.hpp +8 -0
  583. data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +9 -5
  584. data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +233 -0
  585. data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +10 -3
  586. data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +223 -54
  587. data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +201 -0
  588. data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +6 -10
  589. data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_end.hpp +2 -10
  590. data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +661 -0
  591. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +73 -0
  592. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +468 -62
  593. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +120 -0
  594. data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +206 -129
  595. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_begin.hpp +30 -0
  596. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_end.hpp +14 -0
  597. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +1078 -0
  598. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +591 -0
  599. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +55 -0
  600. data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +33 -19
  601. data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +237 -0
  602. data/src/cxx_supportlib/vendor-modified/boost/move/move.hpp +9 -1
  603. data/src/cxx_supportlib/vendor-modified/boost/move/traits.hpp +30 -95
  604. data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +871 -0
  605. data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +53 -98
  606. data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +317 -0
  607. data/src/cxx_supportlib/vendor-modified/boost/mpl/O1_size.hpp +3 -3
  608. data/src/cxx_supportlib/vendor-modified/boost/mpl/O1_size_fwd.hpp +3 -3
  609. data/src/cxx_supportlib/vendor-modified/boost/mpl/accumulate.hpp +3 -3
  610. data/src/cxx_supportlib/vendor-modified/boost/mpl/advance.hpp +3 -3
  611. data/src/cxx_supportlib/vendor-modified/boost/mpl/advance_fwd.hpp +3 -3
  612. data/src/cxx_supportlib/vendor-modified/boost/mpl/alias.hpp +3 -3
  613. data/src/cxx_supportlib/vendor-modified/boost/mpl/always.hpp +6 -7
  614. data/src/cxx_supportlib/vendor-modified/boost/mpl/and.hpp +5 -5
  615. data/src/cxx_supportlib/vendor-modified/boost/mpl/apply.hpp +3 -3
  616. data/src/cxx_supportlib/vendor-modified/boost/mpl/apply_fwd.hpp +3 -3
  617. data/src/cxx_supportlib/vendor-modified/boost/mpl/apply_wrap.hpp +3 -3
  618. data/src/cxx_supportlib/vendor-modified/boost/mpl/arg.hpp +3 -3
  619. data/src/cxx_supportlib/vendor-modified/boost/mpl/arg_fwd.hpp +3 -3
  620. data/src/cxx_supportlib/vendor-modified/boost/mpl/arithmetic.hpp +3 -3
  621. data/src/cxx_supportlib/vendor-modified/boost/mpl/as_sequence.hpp +3 -3
  622. data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +6 -5
  623. data/src/cxx_supportlib/vendor-modified/boost/mpl/at.hpp +3 -3
  624. data/src/cxx_supportlib/vendor-modified/boost/mpl/at_fwd.hpp +3 -3
  625. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/O1_size_impl.hpp +3 -3
  626. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/adl_barrier.hpp +3 -3
  627. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/advance_backward.hpp +3 -3
  628. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/advance_forward.hpp +3 -3
  629. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/apply_1st.hpp +3 -3
  630. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arg_typedef.hpp +3 -3
  631. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arithmetic_op.hpp +3 -3
  632. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arity.hpp +3 -3
  633. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arity_spec.hpp +3 -3
  634. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/at_impl.hpp +3 -3
  635. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/back_impl.hpp +3 -3
  636. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/basic_bind.hpp +3 -3
  637. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/begin_end_impl.hpp +3 -3
  638. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/clear_impl.hpp +3 -3
  639. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/common_name_wknd.hpp +3 -3
  640. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/comparison_op.hpp +3 -3
  641. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/adl.hpp +3 -3
  642. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/arrays.hpp +3 -3
  643. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bcc.hpp +1 -1
  644. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bind.hpp +3 -3
  645. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/compiler.hpp +3 -3
  646. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ctps.hpp +3 -3
  647. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dependent_nttp.hpp +3 -3
  648. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp +3 -3
  649. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dtp.hpp +3 -3
  650. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/eti.hpp +3 -3
  651. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/forwarding.hpp +3 -3
  652. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/gcc.hpp +3 -3
  653. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/gpu.hpp +35 -0
  654. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/has_apply.hpp +3 -3
  655. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/has_xxx.hpp +3 -3
  656. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/integral.hpp +3 -3
  657. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/intel.hpp +3 -3
  658. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/lambda.hpp +3 -3
  659. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/msvc.hpp +3 -3
  660. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/msvc_typename.hpp +3 -3
  661. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/nttp.hpp +3 -3
  662. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/operators.hpp +4 -3
  663. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/overload_resolution.hpp +3 -3
  664. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/pp_counter.hpp +3 -3
  665. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/preprocessor.hpp +3 -3
  666. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/static_constant.hpp +3 -3
  667. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ttp.hpp +3 -3
  668. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/typeof.hpp +3 -3
  669. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/use_preprocessed.hpp +3 -3
  670. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/workaround.hpp +3 -3
  671. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/contains_impl.hpp +3 -3
  672. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/count_args.hpp +3 -3
  673. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/count_impl.hpp +3 -3
  674. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/empty_impl.hpp +3 -3
  675. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/erase_impl.hpp +3 -3
  676. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/erase_key_impl.hpp +3 -3
  677. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/filter_iter.hpp +3 -3
  678. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_impl.hpp +3 -3
  679. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_impl_body.hpp +3 -3
  680. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_op.hpp +3 -3
  681. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_pred.hpp +3 -3
  682. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/front_impl.hpp +3 -3
  683. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/full_lambda.hpp +3 -3
  684. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_apply.hpp +3 -3
  685. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_begin.hpp +3 -3
  686. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_key_impl.hpp +3 -3
  687. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_rebind.hpp +3 -3
  688. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_size.hpp +3 -3
  689. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_tag.hpp +3 -3
  690. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_type.hpp +3 -3
  691. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/include_preprocessed.hpp +3 -3
  692. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/insert_impl.hpp +3 -3
  693. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/insert_range_impl.hpp +22 -19
  694. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/inserter_algorithm.hpp +3 -3
  695. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/integral_wrapper.hpp +4 -4
  696. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/is_msvc_eti_arg.hpp +3 -3
  697. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_apply.hpp +3 -3
  698. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_fold_if_impl.hpp +3 -3
  699. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_fold_impl.hpp +3 -3
  700. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_push_front.hpp +3 -3
  701. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/joint_iter.hpp +3 -3
  702. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_arity_param.hpp +3 -3
  703. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_no_ctps.hpp +3 -3
  704. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_spec.hpp +3 -3
  705. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_support.hpp +3 -3
  706. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/largest_int.hpp +3 -3
  707. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/logical_op.hpp +3 -3
  708. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_dtw.hpp +3 -3
  709. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_eti_base.hpp +3 -3
  710. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_is_class.hpp +3 -3
  711. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_never_true.hpp +3 -3
  712. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_type.hpp +3 -3
  713. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na.hpp +3 -3
  714. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_assert.hpp +3 -3
  715. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_fwd.hpp +3 -3
  716. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_spec.hpp +3 -3
  717. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/nested_type_wknd.hpp +3 -3
  718. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/nttp_decl.hpp +3 -3
  719. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/numeric_cast_utils.hpp +3 -3
  720. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/numeric_op.hpp +3 -3
  721. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/order_impl.hpp +3 -3
  722. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/overload_names.hpp +3 -3
  723. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/partition_op.hpp +3 -3
  724. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/pop_back_impl.hpp +3 -3
  725. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/pop_front_impl.hpp +3 -3
  726. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/add.hpp +3 -3
  727. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/def_params_tail.hpp +3 -3
  728. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/default_params.hpp +3 -3
  729. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/enum.hpp +3 -3
  730. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/ext_params.hpp +3 -3
  731. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/filter_params.hpp +3 -3
  732. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/is_seq.hpp +3 -3
  733. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/params.hpp +3 -3
  734. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/partial_spec_params.hpp +3 -3
  735. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/range.hpp +11 -4
  736. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/repeat.hpp +3 -3
  737. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/sub.hpp +3 -3
  738. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/token_equal.hpp +3 -3
  739. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/tuple.hpp +3 -3
  740. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/ptr_to_ref.hpp +3 -3
  741. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/push_back_impl.hpp +3 -3
  742. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/push_front_impl.hpp +3 -3
  743. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/O1_size.hpp +3 -3
  744. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/back.hpp +3 -3
  745. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/empty.hpp +3 -3
  746. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/front.hpp +3 -3
  747. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/iterator.hpp +3 -3
  748. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/size.hpp +3 -3
  749. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/tag.hpp +3 -3
  750. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_fold_impl.hpp +3 -3
  751. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_fold_impl_body.hpp +3 -3
  752. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_iter_fold_impl.hpp +3 -3
  753. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/sequence_wrapper.hpp +3 -3
  754. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/shift_op.hpp +3 -3
  755. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/single_element_iter.hpp +3 -3
  756. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/size_impl.hpp +3 -3
  757. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/sort_impl.hpp +3 -3
  758. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/static_cast.hpp +3 -3
  759. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/template_arity.hpp +3 -3
  760. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/template_arity_fwd.hpp +3 -3
  761. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test.hpp +3 -3
  762. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/assert.hpp +3 -3
  763. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/data.hpp +3 -3
  764. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/test_case.hpp +3 -3
  765. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/traits_lambda_spec.hpp +3 -3
  766. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/transform_iter.hpp +3 -3
  767. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/type_wrapper.hpp +3 -3
  768. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/unwrap.hpp +7 -3
  769. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/value_wknd.hpp +3 -3
  770. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/yes_no.hpp +3 -3
  771. data/src/cxx_supportlib/vendor-modified/boost/mpl/back.hpp +3 -3
  772. data/src/cxx_supportlib/vendor-modified/boost/mpl/back_fwd.hpp +3 -3
  773. data/src/cxx_supportlib/vendor-modified/boost/mpl/back_inserter.hpp +3 -3
  774. data/src/cxx_supportlib/vendor-modified/boost/mpl/base.hpp +3 -3
  775. data/src/cxx_supportlib/vendor-modified/boost/mpl/begin.hpp +3 -3
  776. data/src/cxx_supportlib/vendor-modified/boost/mpl/begin_end.hpp +3 -3
  777. data/src/cxx_supportlib/vendor-modified/boost/mpl/begin_end_fwd.hpp +3 -3
  778. data/src/cxx_supportlib/vendor-modified/boost/mpl/bind.hpp +3 -3
  779. data/src/cxx_supportlib/vendor-modified/boost/mpl/bind_fwd.hpp +3 -3
  780. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitand.hpp +5 -5
  781. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitor.hpp +5 -5
  782. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitwise.hpp +3 -3
  783. data/src/cxx_supportlib/vendor-modified/boost/mpl/bitxor.hpp +3 -3
  784. data/src/cxx_supportlib/vendor-modified/boost/mpl/bool.hpp +4 -4
  785. data/src/cxx_supportlib/vendor-modified/boost/mpl/bool_fwd.hpp +3 -3
  786. data/src/cxx_supportlib/vendor-modified/boost/mpl/clear.hpp +3 -3
  787. data/src/cxx_supportlib/vendor-modified/boost/mpl/clear_fwd.hpp +3 -3
  788. data/src/cxx_supportlib/vendor-modified/boost/mpl/comparison.hpp +3 -3
  789. data/src/cxx_supportlib/vendor-modified/boost/mpl/contains.hpp +3 -3
  790. data/src/cxx_supportlib/vendor-modified/boost/mpl/contains_fwd.hpp +3 -3
  791. data/src/cxx_supportlib/vendor-modified/boost/mpl/copy.hpp +3 -3
  792. data/src/cxx_supportlib/vendor-modified/boost/mpl/copy_if.hpp +3 -3
  793. data/src/cxx_supportlib/vendor-modified/boost/mpl/count.hpp +3 -3
  794. data/src/cxx_supportlib/vendor-modified/boost/mpl/count_fwd.hpp +3 -3
  795. data/src/cxx_supportlib/vendor-modified/boost/mpl/count_if.hpp +3 -3
  796. data/src/cxx_supportlib/vendor-modified/boost/mpl/deque.hpp +3 -3
  797. data/src/cxx_supportlib/vendor-modified/boost/mpl/deref.hpp +3 -3
  798. data/src/cxx_supportlib/vendor-modified/boost/mpl/distance.hpp +3 -3
  799. data/src/cxx_supportlib/vendor-modified/boost/mpl/distance_fwd.hpp +3 -3
  800. data/src/cxx_supportlib/vendor-modified/boost/mpl/divides.hpp +3 -3
  801. data/src/cxx_supportlib/vendor-modified/boost/mpl/empty.hpp +3 -3
  802. data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_base.hpp +13 -9
  803. data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_fwd.hpp +3 -3
  804. data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_sequence.hpp +5 -4
  805. data/src/cxx_supportlib/vendor-modified/boost/mpl/end.hpp +3 -3
  806. data/src/cxx_supportlib/vendor-modified/boost/mpl/equal.hpp +3 -3
  807. data/src/cxx_supportlib/vendor-modified/boost/mpl/equal_to.hpp +3 -3
  808. data/src/cxx_supportlib/vendor-modified/boost/mpl/erase.hpp +3 -3
  809. data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_fwd.hpp +3 -3
  810. data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_key.hpp +3 -3
  811. data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_key_fwd.hpp +3 -3
  812. data/src/cxx_supportlib/vendor-modified/boost/mpl/eval_if.hpp +6 -6
  813. data/src/cxx_supportlib/vendor-modified/boost/mpl/filter_view.hpp +3 -3
  814. data/src/cxx_supportlib/vendor-modified/boost/mpl/find.hpp +3 -3
  815. data/src/cxx_supportlib/vendor-modified/boost/mpl/find_if.hpp +3 -3
  816. data/src/cxx_supportlib/vendor-modified/boost/mpl/fold.hpp +3 -3
  817. data/src/cxx_supportlib/vendor-modified/boost/mpl/for_each.hpp +11 -4
  818. data/src/cxx_supportlib/vendor-modified/boost/mpl/front.hpp +3 -3
  819. data/src/cxx_supportlib/vendor-modified/boost/mpl/front_fwd.hpp +3 -3
  820. data/src/cxx_supportlib/vendor-modified/boost/mpl/front_inserter.hpp +3 -3
  821. data/src/cxx_supportlib/vendor-modified/boost/mpl/greater.hpp +3 -3
  822. data/src/cxx_supportlib/vendor-modified/boost/mpl/greater_equal.hpp +3 -3
  823. data/src/cxx_supportlib/vendor-modified/boost/mpl/has_key.hpp +3 -3
  824. data/src/cxx_supportlib/vendor-modified/boost/mpl/has_key_fwd.hpp +3 -3
  825. data/src/cxx_supportlib/vendor-modified/boost/mpl/has_xxx.hpp +12 -5
  826. data/src/cxx_supportlib/vendor-modified/boost/mpl/identity.hpp +3 -3
  827. data/src/cxx_supportlib/vendor-modified/boost/mpl/if.hpp +3 -3
  828. data/src/cxx_supportlib/vendor-modified/boost/mpl/index_if.hpp +3 -3
  829. data/src/cxx_supportlib/vendor-modified/boost/mpl/index_of.hpp +3 -3
  830. data/src/cxx_supportlib/vendor-modified/boost/mpl/inherit.hpp +3 -3
  831. data/src/cxx_supportlib/vendor-modified/boost/mpl/inherit_linearly.hpp +3 -3
  832. data/src/cxx_supportlib/vendor-modified/boost/mpl/insert.hpp +3 -3
  833. data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_fwd.hpp +3 -3
  834. data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_range.hpp +3 -3
  835. data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_range_fwd.hpp +3 -3
  836. data/src/cxx_supportlib/vendor-modified/boost/mpl/inserter.hpp +3 -3
  837. data/src/cxx_supportlib/vendor-modified/boost/mpl/int.hpp +3 -3
  838. data/src/cxx_supportlib/vendor-modified/boost/mpl/int_fwd.hpp +3 -3
  839. data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c.hpp +3 -3
  840. data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c_fwd.hpp +3 -3
  841. data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c_tag.hpp +3 -3
  842. data/src/cxx_supportlib/vendor-modified/boost/mpl/is_placeholder.hpp +3 -3
  843. data/src/cxx_supportlib/vendor-modified/boost/mpl/is_sequence.hpp +3 -3
  844. data/src/cxx_supportlib/vendor-modified/boost/mpl/iter_fold.hpp +3 -3
  845. data/src/cxx_supportlib/vendor-modified/boost/mpl/iter_fold_if.hpp +3 -3
  846. data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_category.hpp +3 -3
  847. data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_range.hpp +3 -3
  848. data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_tags.hpp +3 -3
  849. data/src/cxx_supportlib/vendor-modified/boost/mpl/joint_view.hpp +3 -3
  850. data/src/cxx_supportlib/vendor-modified/boost/mpl/key_type.hpp +3 -3
  851. data/src/cxx_supportlib/vendor-modified/boost/mpl/key_type_fwd.hpp +3 -3
  852. data/src/cxx_supportlib/vendor-modified/boost/mpl/lambda.hpp +3 -3
  853. data/src/cxx_supportlib/vendor-modified/boost/mpl/lambda_fwd.hpp +3 -3
  854. data/src/cxx_supportlib/vendor-modified/boost/mpl/less.hpp +3 -3
  855. data/src/cxx_supportlib/vendor-modified/boost/mpl/less_equal.hpp +3 -3
  856. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/arity.hpp +3 -3
  857. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/list.hpp +3 -3
  858. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/map.hpp +3 -3
  859. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/set.hpp +3 -3
  860. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/unrolling.hpp +3 -3
  861. data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/vector.hpp +3 -3
  862. data/src/cxx_supportlib/vendor-modified/boost/mpl/list.hpp +3 -3
  863. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/O1_size.hpp +3 -3
  864. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/begin_end.hpp +3 -3
  865. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/clear.hpp +3 -3
  866. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/empty.hpp +3 -3
  867. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/front.hpp +3 -3
  868. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/include_preprocessed.hpp +3 -3
  869. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/item.hpp +3 -3
  870. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/iterator.hpp +3 -3
  871. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/numbered.hpp +3 -3
  872. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/numbered_c.hpp +3 -3
  873. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/pop_front.hpp +3 -3
  874. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/push_back.hpp +3 -3
  875. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/push_front.hpp +3 -3
  876. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/size.hpp +3 -3
  877. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/tag.hpp +3 -3
  878. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list0.hpp +3 -3
  879. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list0_c.hpp +3 -3
  880. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list10.hpp +3 -3
  881. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list10_c.hpp +3 -3
  882. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list20.hpp +3 -3
  883. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list20_c.hpp +3 -3
  884. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list30.hpp +3 -3
  885. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list30_c.hpp +3 -3
  886. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list40.hpp +3 -3
  887. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list40_c.hpp +3 -3
  888. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list50.hpp +3 -3
  889. data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list50_c.hpp +3 -3
  890. data/src/cxx_supportlib/vendor-modified/boost/mpl/list_c.hpp +3 -3
  891. data/src/cxx_supportlib/vendor-modified/boost/mpl/logical.hpp +3 -3
  892. data/src/cxx_supportlib/vendor-modified/boost/mpl/long.hpp +3 -3
  893. data/src/cxx_supportlib/vendor-modified/boost/mpl/long_fwd.hpp +3 -3
  894. data/src/cxx_supportlib/vendor-modified/boost/mpl/lower_bound.hpp +3 -3
  895. data/src/cxx_supportlib/vendor-modified/boost/mpl/map.hpp +3 -3
  896. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/at_impl.hpp +3 -3
  897. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/begin_end_impl.hpp +3 -3
  898. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/clear_impl.hpp +3 -3
  899. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/contains_impl.hpp +3 -3
  900. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/empty_impl.hpp +3 -3
  901. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/erase_impl.hpp +3 -3
  902. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/erase_key_impl.hpp +3 -3
  903. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/has_key_impl.hpp +3 -3
  904. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/include_preprocessed.hpp +3 -3
  905. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/insert_impl.hpp +3 -3
  906. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/insert_range_impl.hpp +41 -0
  907. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/item.hpp +6 -3
  908. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/iterator.hpp +3 -3
  909. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/key_type_impl.hpp +3 -3
  910. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/map0.hpp +3 -3
  911. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/numbered.hpp +3 -3
  912. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/size_impl.hpp +3 -3
  913. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/tag.hpp +3 -3
  914. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/value_type_impl.hpp +3 -3
  915. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map0.hpp +4 -3
  916. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map10.hpp +3 -3
  917. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map20.hpp +3 -3
  918. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map30.hpp +3 -3
  919. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map40.hpp +3 -3
  920. data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map50.hpp +3 -3
  921. data/src/cxx_supportlib/vendor-modified/boost/mpl/math/fixed_c.hpp +3 -3
  922. data/src/cxx_supportlib/vendor-modified/boost/mpl/math/is_even.hpp +3 -3
  923. data/src/cxx_supportlib/vendor-modified/boost/mpl/math/rational_c.hpp +3 -3
  924. data/src/cxx_supportlib/vendor-modified/boost/mpl/max.hpp +3 -3
  925. data/src/cxx_supportlib/vendor-modified/boost/mpl/max_element.hpp +3 -3
  926. data/src/cxx_supportlib/vendor-modified/boost/mpl/min.hpp +3 -3
  927. data/src/cxx_supportlib/vendor-modified/boost/mpl/min_element.hpp +3 -3
  928. data/src/cxx_supportlib/vendor-modified/boost/mpl/min_max.hpp +3 -3
  929. data/src/cxx_supportlib/vendor-modified/boost/mpl/minus.hpp +3 -3
  930. data/src/cxx_supportlib/vendor-modified/boost/mpl/modulus.hpp +3 -3
  931. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiplies.hpp +3 -3
  932. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/count_impl.hpp +3 -3
  933. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/insert_impl.hpp +3 -3
  934. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/item.hpp +3 -3
  935. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/multiset0.hpp +3 -3
  936. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/tag.hpp +3 -3
  937. data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/multiset0.hpp +3 -3
  938. data/src/cxx_supportlib/vendor-modified/boost/mpl/negate.hpp +3 -3
  939. data/src/cxx_supportlib/vendor-modified/boost/mpl/next.hpp +3 -3
  940. data/src/cxx_supportlib/vendor-modified/boost/mpl/next_prior.hpp +3 -3
  941. data/src/cxx_supportlib/vendor-modified/boost/mpl/not.hpp +3 -3
  942. data/src/cxx_supportlib/vendor-modified/boost/mpl/not_equal_to.hpp +3 -3
  943. data/src/cxx_supportlib/vendor-modified/boost/mpl/numeric_cast.hpp +3 -3
  944. data/src/cxx_supportlib/vendor-modified/boost/mpl/or.hpp +5 -5
  945. data/src/cxx_supportlib/vendor-modified/boost/mpl/order.hpp +3 -3
  946. data/src/cxx_supportlib/vendor-modified/boost/mpl/order_fwd.hpp +3 -3
  947. data/src/cxx_supportlib/vendor-modified/boost/mpl/pair.hpp +3 -3
  948. data/src/cxx_supportlib/vendor-modified/boost/mpl/pair_view.hpp +3 -3
  949. data/src/cxx_supportlib/vendor-modified/boost/mpl/partition.hpp +3 -3
  950. data/src/cxx_supportlib/vendor-modified/boost/mpl/placeholders.hpp +3 -3
  951. data/src/cxx_supportlib/vendor-modified/boost/mpl/plus.hpp +3 -3
  952. data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_back.hpp +3 -3
  953. data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_back_fwd.hpp +3 -3
  954. data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_front.hpp +3 -3
  955. data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_front_fwd.hpp +3 -3
  956. data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +7 -6
  957. data/src/cxx_supportlib/vendor-modified/boost/mpl/prior.hpp +3 -3
  958. data/src/cxx_supportlib/vendor-modified/boost/mpl/protect.hpp +3 -3
  959. data/src/cxx_supportlib/vendor-modified/boost/mpl/push_back.hpp +3 -3
  960. data/src/cxx_supportlib/vendor-modified/boost/mpl/push_back_fwd.hpp +3 -3
  961. data/src/cxx_supportlib/vendor-modified/boost/mpl/push_front.hpp +3 -3
  962. data/src/cxx_supportlib/vendor-modified/boost/mpl/push_front_fwd.hpp +3 -3
  963. data/src/cxx_supportlib/vendor-modified/boost/mpl/quote.hpp +3 -3
  964. data/src/cxx_supportlib/vendor-modified/boost/mpl/range_c.hpp +3 -3
  965. data/src/cxx_supportlib/vendor-modified/boost/mpl/remove.hpp +3 -3
  966. data/src/cxx_supportlib/vendor-modified/boost/mpl/remove_if.hpp +3 -3
  967. data/src/cxx_supportlib/vendor-modified/boost/mpl/replace.hpp +3 -3
  968. data/src/cxx_supportlib/vendor-modified/boost/mpl/replace_if.hpp +3 -3
  969. data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse.hpp +3 -3
  970. data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse_fold.hpp +3 -3
  971. data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse_iter_fold.hpp +3 -3
  972. data/src/cxx_supportlib/vendor-modified/boost/mpl/same_as.hpp +3 -3
  973. data/src/cxx_supportlib/vendor-modified/boost/mpl/sequence_tag.hpp +3 -3
  974. data/src/cxx_supportlib/vendor-modified/boost/mpl/sequence_tag_fwd.hpp +3 -3
  975. data/src/cxx_supportlib/vendor-modified/boost/mpl/set.hpp +3 -3
  976. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/at_impl.hpp +3 -3
  977. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/begin_end_impl.hpp +3 -3
  978. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/clear_impl.hpp +3 -3
  979. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/empty_impl.hpp +3 -3
  980. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/erase_impl.hpp +3 -3
  981. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/erase_key_impl.hpp +3 -3
  982. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/has_key_impl.hpp +3 -3
  983. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/include_preprocessed.hpp +3 -3
  984. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/insert_impl.hpp +3 -3
  985. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/insert_range_impl.hpp +41 -0
  986. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/item.hpp +8 -6
  987. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/iterator.hpp +3 -3
  988. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/key_type_impl.hpp +3 -3
  989. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/numbered.hpp +3 -3
  990. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/numbered_c.hpp +3 -3
  991. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/set0.hpp +3 -3
  992. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/size_impl.hpp +3 -3
  993. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/tag.hpp +3 -3
  994. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/value_type_impl.hpp +3 -3
  995. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set0.hpp +4 -3
  996. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set0_c.hpp +3 -3
  997. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set10.hpp +3 -3
  998. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set10_c.hpp +3 -3
  999. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set20.hpp +3 -3
  1000. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set20_c.hpp +3 -3
  1001. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set30.hpp +3 -3
  1002. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set30_c.hpp +3 -3
  1003. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set40.hpp +3 -3
  1004. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set40_c.hpp +3 -3
  1005. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set50.hpp +3 -3
  1006. data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set50_c.hpp +3 -3
  1007. data/src/cxx_supportlib/vendor-modified/boost/mpl/set_c.hpp +3 -3
  1008. data/src/cxx_supportlib/vendor-modified/boost/mpl/shift_left.hpp +3 -3
  1009. data/src/cxx_supportlib/vendor-modified/boost/mpl/shift_right.hpp +3 -3
  1010. data/src/cxx_supportlib/vendor-modified/boost/mpl/single_view.hpp +3 -3
  1011. data/src/cxx_supportlib/vendor-modified/boost/mpl/size.hpp +3 -3
  1012. data/src/cxx_supportlib/vendor-modified/boost/mpl/size_fwd.hpp +3 -3
  1013. data/src/cxx_supportlib/vendor-modified/boost/mpl/size_t.hpp +3 -3
  1014. data/src/cxx_supportlib/vendor-modified/boost/mpl/size_t_fwd.hpp +3 -3
  1015. data/src/cxx_supportlib/vendor-modified/boost/mpl/sizeof.hpp +3 -3
  1016. data/src/cxx_supportlib/vendor-modified/boost/mpl/sort.hpp +3 -3
  1017. data/src/cxx_supportlib/vendor-modified/boost/mpl/stable_partition.hpp +3 -3
  1018. data/src/cxx_supportlib/vendor-modified/boost/mpl/string.hpp +2 -2
  1019. data/src/cxx_supportlib/vendor-modified/boost/mpl/switch.hpp +3 -3
  1020. data/src/cxx_supportlib/vendor-modified/boost/mpl/tag.hpp +3 -3
  1021. data/src/cxx_supportlib/vendor-modified/boost/mpl/times.hpp +3 -3
  1022. data/src/cxx_supportlib/vendor-modified/boost/mpl/transform.hpp +3 -3
  1023. data/src/cxx_supportlib/vendor-modified/boost/mpl/transform_view.hpp +3 -3
  1024. data/src/cxx_supportlib/vendor-modified/boost/mpl/unique.hpp +3 -3
  1025. data/src/cxx_supportlib/vendor-modified/boost/mpl/unpack_args.hpp +3 -3
  1026. data/src/cxx_supportlib/vendor-modified/boost/mpl/upper_bound.hpp +3 -3
  1027. data/src/cxx_supportlib/vendor-modified/boost/mpl/value_type.hpp +3 -3
  1028. data/src/cxx_supportlib/vendor-modified/boost/mpl/value_type_fwd.hpp +3 -3
  1029. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector.hpp +3 -3
  1030. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/O1_size.hpp +3 -3
  1031. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/at.hpp +3 -3
  1032. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/back.hpp +3 -3
  1033. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/begin_end.hpp +3 -3
  1034. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/clear.hpp +3 -3
  1035. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/empty.hpp +3 -3
  1036. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/front.hpp +3 -3
  1037. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/include_preprocessed.hpp +3 -3
  1038. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/item.hpp +3 -3
  1039. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/iterator.hpp +3 -3
  1040. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/numbered.hpp +3 -3
  1041. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/numbered_c.hpp +3 -3
  1042. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/pop_back.hpp +3 -3
  1043. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/pop_front.hpp +3 -3
  1044. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/push_back.hpp +3 -3
  1045. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/push_front.hpp +3 -3
  1046. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/size.hpp +3 -3
  1047. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/tag.hpp +3 -3
  1048. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/vector0.hpp +3 -3
  1049. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector0.hpp +3 -3
  1050. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector0_c.hpp +3 -3
  1051. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector10.hpp +3 -3
  1052. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector10_c.hpp +3 -3
  1053. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector20.hpp +3 -3
  1054. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector20_c.hpp +3 -3
  1055. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector30.hpp +3 -3
  1056. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector30_c.hpp +3 -3
  1057. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector40.hpp +3 -3
  1058. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector40_c.hpp +3 -3
  1059. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector50.hpp +3 -3
  1060. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector50_c.hpp +3 -3
  1061. data/src/cxx_supportlib/vendor-modified/boost/mpl/vector_c.hpp +3 -3
  1062. data/src/cxx_supportlib/vendor-modified/boost/mpl/void.hpp +3 -3
  1063. data/src/cxx_supportlib/vendor-modified/boost/mpl/void_fwd.hpp +3 -3
  1064. data/src/cxx_supportlib/vendor-modified/boost/mpl/zip_view.hpp +3 -3
  1065. data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +118 -4
  1066. data/src/cxx_supportlib/vendor-modified/boost/noncopyable.hpp +12 -43
  1067. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +32 -1
  1068. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +18 -2
  1069. data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +9 -37
  1070. data/src/cxx_supportlib/vendor-modified/boost/optional/bad_optional_access.hpp +32 -0
  1071. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +660 -84
  1072. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +3 -2
  1073. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +94 -0
  1074. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/arg_list.hpp +4 -27
  1075. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/cast.hpp +2 -4
  1076. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/parenthesized_type.hpp +0 -84
  1077. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/set.hpp +1 -2
  1078. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tagged_argument.hpp +2 -2
  1079. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +0 -6
  1080. data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +2 -28
  1081. data/src/cxx_supportlib/vendor-modified/boost/parameter/keyword.hpp +0 -30
  1082. data/src/cxx_supportlib/vendor-modified/boost/parameter/name.hpp +5 -15
  1083. data/src/cxx_supportlib/vendor-modified/boost/parameter/preprocessor.hpp +6 -107
  1084. data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +2 -28
  1085. data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +1 -1
  1086. data/src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp +12 -12
  1087. data/src/cxx_supportlib/vendor-modified/boost/predef.h +24 -0
  1088. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture.h +32 -0
  1089. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/alpha.h +59 -0
  1090. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +70 -0
  1091. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/blackfin.h +46 -0
  1092. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/convex.h +65 -0
  1093. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ia64.h +49 -0
  1094. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/m68k.h +82 -0
  1095. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/mips.h +73 -0
  1096. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/parisc.h +64 -0
  1097. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ppc.h +72 -0
  1098. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/pyramid.h +42 -0
  1099. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/rs6k.h +56 -0
  1100. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sparc.h +54 -0
  1101. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/superh.h +67 -0
  1102. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys370.h +43 -0
  1103. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys390.h +43 -0
  1104. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86.h +38 -0
  1105. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/32.h +87 -0
  1106. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/64.h +50 -0
  1107. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/z.h +42 -0
  1108. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler.h +43 -0
  1109. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/borland.h +63 -0
  1110. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/clang.h +56 -0
  1111. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/comeau.h +61 -0
  1112. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/compaq.h +66 -0
  1113. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/diab.h +56 -0
  1114. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/digitalmars.h +56 -0
  1115. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/dignus.h +56 -0
  1116. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/edg.h +56 -0
  1117. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ekopath.h +57 -0
  1118. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc.h +68 -0
  1119. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc_xml.h +53 -0
  1120. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/greenhills.h +66 -0
  1121. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/hp_acc.h +61 -0
  1122. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/iar.h +56 -0
  1123. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ibm.h +72 -0
  1124. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +65 -0
  1125. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/kai.h +56 -0
  1126. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/llvm.h +57 -0
  1127. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metaware.h +53 -0
  1128. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metrowerks.h +77 -0
  1129. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/microtec.h +53 -0
  1130. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/mpw.h +63 -0
  1131. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/palm.h +56 -0
  1132. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/pgi.h +60 -0
  1133. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sgi_mipspro.h +66 -0
  1134. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sunpro.h +76 -0
  1135. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/tendra.h +53 -0
  1136. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +91 -0
  1137. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/watcom.h +56 -0
  1138. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/_cassert.h +17 -0
  1139. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/_exception.h +15 -0
  1140. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/comp_detected.h +10 -0
  1141. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/endian_compat.h +26 -0
  1142. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/os_detected.h +10 -0
  1143. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/platform_detected.h +10 -0
  1144. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/test.h +17 -0
  1145. data/src/cxx_supportlib/vendor-modified/boost/predef/detail/test_def.h +71 -0
  1146. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware.h +16 -0
  1147. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +107 -0
  1148. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm.h +57 -0
  1149. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm/versions.h +32 -0
  1150. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc.h +69 -0
  1151. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc/versions.h +51 -0
  1152. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +123 -0
  1153. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86/versions.h +129 -0
  1154. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +87 -0
  1155. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +51 -0
  1156. data/src/cxx_supportlib/vendor-modified/boost/predef/language.h +17 -0
  1157. data/src/cxx_supportlib/vendor-modified/boost/predef/language/objc.h +42 -0
  1158. data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdc.h +53 -0
  1159. data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdcpp.h +121 -0
  1160. data/src/cxx_supportlib/vendor-modified/boost/predef/library.h +16 -0
  1161. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c.h +20 -0
  1162. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/_prefix.h +13 -0
  1163. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/gnu.h +61 -0
  1164. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/uc.h +47 -0
  1165. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/vms.h +47 -0
  1166. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/zos.h +56 -0
  1167. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std.h +25 -0
  1168. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/_prefix.h +23 -0
  1169. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/cxx.h +46 -0
  1170. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/dinkumware.h +52 -0
  1171. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/libcomo.h +47 -0
  1172. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/modena.h +45 -0
  1173. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/msl.h +53 -0
  1174. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/roguewave.h +56 -0
  1175. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/sgi.h +51 -0
  1176. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stdcpp3.h +53 -0
  1177. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stlport.h +59 -0
  1178. data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/vacpp.h +44 -0
  1179. data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +89 -0
  1180. data/src/cxx_supportlib/vendor-modified/boost/predef/os.h +33 -0
  1181. data/src/cxx_supportlib/vendor-modified/boost/predef/os/aix.h +66 -0
  1182. data/src/cxx_supportlib/vendor-modified/boost/predef/os/amigaos.h +46 -0
  1183. data/src/cxx_supportlib/vendor-modified/boost/predef/os/android.h +45 -0
  1184. data/src/cxx_supportlib/vendor-modified/boost/predef/os/beos.h +45 -0
  1185. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd.h +103 -0
  1186. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/bsdi.h +48 -0
  1187. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/dragonfly.h +50 -0
  1188. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/free.h +60 -0
  1189. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/net.h +84 -0
  1190. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/open.h +171 -0
  1191. data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +45 -0
  1192. data/src/cxx_supportlib/vendor-modified/boost/predef/os/haiku.h +46 -0
  1193. data/src/cxx_supportlib/vendor-modified/boost/predef/os/hpux.h +47 -0
  1194. data/src/cxx_supportlib/vendor-modified/boost/predef/os/ios.h +51 -0
  1195. data/src/cxx_supportlib/vendor-modified/boost/predef/os/irix.h +46 -0
  1196. data/src/cxx_supportlib/vendor-modified/boost/predef/os/linux.h +46 -0
  1197. data/src/cxx_supportlib/vendor-modified/boost/predef/os/macos.h +65 -0
  1198. data/src/cxx_supportlib/vendor-modified/boost/predef/os/os400.h +45 -0
  1199. data/src/cxx_supportlib/vendor-modified/boost/predef/os/qnxnto.h +59 -0
  1200. data/src/cxx_supportlib/vendor-modified/boost/predef/os/solaris.h +46 -0
  1201. data/src/cxx_supportlib/vendor-modified/boost/predef/os/unix.h +76 -0
  1202. data/src/cxx_supportlib/vendor-modified/boost/predef/os/vms.h +52 -0
  1203. data/src/cxx_supportlib/vendor-modified/boost/predef/os/windows.h +51 -0
  1204. data/src/cxx_supportlib/vendor-modified/boost/predef/other.h +16 -0
  1205. data/src/cxx_supportlib/vendor-modified/boost/predef/other/endian.h +204 -0
  1206. data/src/cxx_supportlib/vendor-modified/boost/predef/platform.h +21 -0
  1207. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw.h +69 -0
  1208. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_desktop.h +45 -0
  1209. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_phone.h +43 -0
  1210. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_runtime.h +45 -0
  1211. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_store.h +43 -0
  1212. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +15 -0
  1213. data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +53 -0
  1214. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/dec.hpp +1 -0
  1215. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/detail/get_data.hpp +55 -0
  1216. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/push_back.hpp +3 -1
  1217. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/push_front.hpp +3 -1
  1218. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_list.hpp +17 -3
  1219. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_seq.hpp +16 -3
  1220. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_tuple.hpp +12 -1
  1221. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +11 -12
  1222. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/detail/is_empty.hpp +55 -0
  1223. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/empty.hpp +2 -0
  1224. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/identity.hpp +4 -0
  1225. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty.hpp +17 -4
  1226. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_or_1.hpp +2 -1
  1227. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_variadic.hpp +57 -0
  1228. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/library.hpp +1 -0
  1229. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_array.hpp +33 -1
  1230. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_tuple.hpp +27 -4
  1231. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation.hpp +2 -0
  1232. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/detail/is_begin_parens.hpp +48 -0
  1233. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/is_begin_parens.hpp +51 -0
  1234. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/remove_parens.hpp +39 -0
  1235. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/for.hpp +19 -1
  1236. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq.hpp +1 -0
  1237. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +10 -2
  1238. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/is_empty.hpp +49 -0
  1239. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each.hpp +57 -10
  1240. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each_i.hpp +58 -10
  1241. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/replace.hpp +18 -2
  1242. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/rest_n.hpp +19 -3
  1243. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/size.hpp +1 -0
  1244. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/variadic_seq_to_seq.hpp +28 -0
  1245. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple.hpp +8 -1
  1246. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/detail/is_single_return.hpp +28 -0
  1247. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/eat.hpp +10 -1
  1248. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/elem.hpp +12 -2
  1249. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/insert.hpp +37 -0
  1250. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_back.hpp +64 -0
  1251. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_front.hpp +65 -0
  1252. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_back.hpp +31 -0
  1253. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_front.hpp +32 -0
  1254. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/rem.hpp +18 -3
  1255. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/remove.hpp +64 -0
  1256. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/replace.hpp +37 -0
  1257. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/reverse.hpp +4 -1
  1258. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_array.hpp +3 -1
  1259. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_list.hpp +3 -1
  1260. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_seq.hpp +6 -1
  1261. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/is_single_return.hpp +28 -0
  1262. data/src/cxx_supportlib/vendor-modified/boost/range/algorithm/equal.hpp +5 -3
  1263. data/src/cxx_supportlib/vendor-modified/boost/range/as_literal.hpp +1 -1
  1264. data/src/cxx_supportlib/vendor-modified/boost/range/begin.hpp +5 -13
  1265. data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +35 -15
  1266. data/src/cxx_supportlib/vendor-modified/boost/range/config.hpp +9 -7
  1267. data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +39 -30
  1268. data/src/cxx_supportlib/vendor-modified/boost/range/detail/common.hpp +4 -3
  1269. data/src/cxx_supportlib/vendor-modified/boost/range/detail/extract_optional_type.hpp +21 -25
  1270. data/src/cxx_supportlib/vendor-modified/boost/range/detail/has_member_size.hpp +66 -0
  1271. data/src/cxx_supportlib/vendor-modified/boost/range/detail/implementation_help.hpp +11 -0
  1272. data/src/cxx_supportlib/vendor-modified/boost/range/detail/msvc_has_iterator_workaround.hpp +132 -0
  1273. data/src/cxx_supportlib/vendor-modified/boost/range/difference_type.hpp +20 -2
  1274. data/src/cxx_supportlib/vendor-modified/boost/range/distance.hpp +1 -1
  1275. data/src/cxx_supportlib/vendor-modified/boost/range/empty.hpp +1 -1
  1276. data/src/cxx_supportlib/vendor-modified/boost/range/end.hpp +5 -13
  1277. data/src/cxx_supportlib/vendor-modified/boost/range/functions.hpp +1 -1
  1278. data/src/cxx_supportlib/vendor-modified/boost/range/has_range_iterator.hpp +83 -0
  1279. data/src/cxx_supportlib/vendor-modified/boost/range/iterator.hpp +36 -34
  1280. data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +481 -251
  1281. data/src/cxx_supportlib/vendor-modified/boost/range/mutable_iterator.hpp +41 -29
  1282. data/src/cxx_supportlib/vendor-modified/boost/range/range_fwd.hpp +63 -0
  1283. data/src/cxx_supportlib/vendor-modified/boost/range/rbegin.hpp +1 -1
  1284. data/src/cxx_supportlib/vendor-modified/boost/range/rend.hpp +1 -1
  1285. data/src/cxx_supportlib/vendor-modified/boost/range/reverse_iterator.hpp +5 -3
  1286. data/src/cxx_supportlib/vendor-modified/boost/range/size.hpp +30 -6
  1287. data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +18 -12
  1288. data/src/cxx_supportlib/vendor-modified/boost/range/value_type.hpp +1 -5
  1289. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/abs.hpp +4 -4
  1290. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/gcd.hpp +1 -1
  1291. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/lcm.hpp +1 -1
  1292. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/sign.hpp +4 -4
  1293. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/overflow_helpers.hpp +1 -1
  1294. data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio.hpp +63 -3
  1295. data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_fwd.hpp +25 -0
  1296. data/src/cxx_supportlib/vendor-modified/boost/ref.hpp +12 -184
  1297. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +51 -9
  1298. data/src/cxx_supportlib/vendor-modified/boost/regex/mfc.hpp +30 -34
  1299. data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +2 -2
  1300. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/static_mutex.hpp +10 -7
  1301. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +11 -5
  1302. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +18 -19
  1303. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +25 -38
  1304. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +211 -14
  1305. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +161 -106
  1306. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +7 -7
  1307. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +9 -9
  1308. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +24 -21
  1309. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_traits.hpp +3 -3
  1310. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +1 -1
  1311. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +24 -19
  1312. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +1 -1
  1313. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +46 -20
  1314. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +38 -14
  1315. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +206 -31
  1316. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +122 -16
  1317. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/primary_transform.hpp +2 -2
  1318. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/protected_call.hpp +1 -1
  1319. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +15 -15
  1320. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_grep.hpp +1 -1
  1321. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +3 -3
  1322. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_match.hpp +1 -1
  1323. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +2 -2
  1324. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_replace.hpp +4 -4
  1325. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_search.hpp +2 -2
  1326. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_split.hpp +5 -5
  1327. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +6 -15
  1328. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +10 -10
  1329. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +10 -4
  1330. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +5 -4
  1331. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/states.hpp +23 -3
  1332. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/sub_match.hpp +75 -71
  1333. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_iterator.hpp +2 -2
  1334. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +6 -15
  1335. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +43 -41
  1336. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +103 -172
  1337. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +318 -0
  1338. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +67 -0
  1339. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +16 -9
  1340. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +106 -70
  1341. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +36 -59
  1342. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_nt.hpp +59 -0
  1343. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/{atomic_count_pthreads.hpp → atomic_count_pt.hpp} +5 -4
  1344. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_spin.hpp +62 -0
  1345. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +60 -0
  1346. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/operator_bool.hpp +2 -1
  1347. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +116 -10
  1348. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_convertible.hpp +1 -0
  1349. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +15 -1
  1350. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +140 -0
  1351. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +16 -15
  1352. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +137 -0
  1353. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +21 -4
  1354. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_disable_deprecated.hpp +40 -0
  1355. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_forward.hpp +13 -0
  1356. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +8 -5
  1357. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_nullptr_t.hpp +1 -1
  1358. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +10 -1
  1359. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +1 -0
  1360. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_pool.hpp +2 -2
  1361. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_std_atomic.hpp +83 -0
  1362. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +30 -2
  1363. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +10 -0
  1364. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +12 -0
  1365. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +80 -169
  1366. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +121 -118
  1367. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +10 -0
  1368. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +8 -6
  1369. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +54 -12
  1370. data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +4 -19
  1371. data/src/cxx_supportlib/vendor-modified/boost/swap.hpp +11 -6
  1372. data/src/cxx_supportlib/vendor-modified/boost/system/config.hpp +1 -0
  1373. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.ipp +467 -0
  1374. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +1 -2
  1375. data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +222 -36
  1376. data/src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp +59 -0
  1377. data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +4 -11
  1378. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_adaptor.hpp +209 -0
  1379. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_base.hpp +202 -0
  1380. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_views.hpp +165 -0
  1381. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +223 -0
  1382. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +223 -0
  1383. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_adaptor.hpp +209 -0
  1384. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_base.hpp +202 -0
  1385. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_op_status.hpp +46 -0
  1386. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +155 -0
  1387. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_bounded_queue.hpp +725 -0
  1388. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_deque.hpp +327 -0
  1389. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_priority_queue.hpp +369 -0
  1390. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_queue.hpp +335 -0
  1391. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +466 -0
  1392. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/deque.hpp +45 -0
  1393. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/devector.hpp +102 -0
  1394. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/functional.hpp +49 -0
  1395. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/list.hpp +35 -0
  1396. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory.hpp +61 -0
  1397. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_arg.hpp +41 -0
  1398. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_traits.hpp +35 -0
  1399. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/config.hpp +16 -0
  1400. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/default_delete.hpp +41 -0
  1401. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/pointer_traits.hpp +35 -0
  1402. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/scoped_allocator.hpp +35 -0
  1403. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/shared_ptr.hpp +42 -0
  1404. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/unique_ptr.hpp +28 -0
  1405. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/queue.hpp +45 -0
  1406. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/tuple.hpp +49 -0
  1407. data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/vector.hpp +35 -0
  1408. data/src/cxx_supportlib/vendor-modified/boost/thread/cv_status.hpp +1 -1
  1409. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +32 -4
  1410. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/counter.hpp +17 -4
  1411. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/delete.hpp +2 -1
  1412. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/function_wrapper.hpp +93 -0
  1413. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoke.hpp +373 -120
  1414. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoker.hpp +762 -0
  1415. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/is_convertible.hpp +4 -3
  1416. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/memory.hpp +11 -119
  1417. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/move.hpp +116 -4
  1418. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/nullary_function.hpp +234 -0
  1419. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +41 -16
  1420. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread_group.hpp +4 -3
  1421. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/variadic_footer.hpp +10 -0
  1422. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/variadic_header.hpp +19 -0
  1423. data/src/cxx_supportlib/vendor-modified/boost/thread/exceptional_ptr.hpp +44 -0
  1424. data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +4 -4
  1425. data/src/cxx_supportlib/vendor-modified/boost/thread/executor.hpp +15 -0
  1426. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/basic_thread_pool.hpp +318 -0
  1427. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/detail/priority_executor_base.hpp +77 -0
  1428. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/detail/scheduled_executor_base.hpp +66 -0
  1429. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +148 -0
  1430. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor_adaptor.hpp +136 -0
  1431. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +213 -0
  1432. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/inline_executor.hpp +171 -0
  1433. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +205 -0
  1434. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduled_thread_pool.hpp +48 -0
  1435. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduler.hpp +271 -0
  1436. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduling_adaptor.hpp +51 -0
  1437. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor.hpp +216 -0
  1438. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor_cont.hpp +170 -0
  1439. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/thread_executor.hpp +157 -0
  1440. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/work.hpp +30 -0
  1441. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/config/inline_namespace.hpp +23 -0
  1442. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/exception_list.hpp +16 -0
  1443. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v1/exception_list.hpp +70 -0
  1444. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v1/inline_namespace.hpp +28 -0
  1445. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/inline_namespace.hpp +29 -0
  1446. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +316 -0
  1447. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/task_region.hpp +16 -0
  1448. data/src/cxx_supportlib/vendor-modified/boost/thread/externally_locked.hpp +2 -2
  1449. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +3327 -1705
  1450. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/future_error.hpp +98 -0
  1451. data/src/cxx_supportlib/vendor-modified/boost/thread/{future_error_code.hpp → futures/future_error_code.hpp} +7 -7
  1452. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/future_status.hpp +30 -0
  1453. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/is_future_type.hpp +21 -0
  1454. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +31 -0
  1455. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +74 -0
  1456. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_any.hpp +161 -0
  1457. data/src/cxx_supportlib/vendor-modified/boost/thread/latch.hpp +43 -15
  1458. data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +45 -41
  1459. data/src/cxx_supportlib/vendor-modified/boost/thread/lockable_adapter.hpp +28 -28
  1460. data/src/cxx_supportlib/vendor-modified/boost/thread/once.hpp +1 -1
  1461. data/src/cxx_supportlib/vendor-modified/boost/thread/ostream_buffer.hpp +45 -0
  1462. data/src/cxx_supportlib/vendor-modified/boost/thread/poly_lockable.hpp +2 -2
  1463. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +101 -56
  1464. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +141 -47
  1465. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/mutex.hpp +20 -13
  1466. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +4 -4
  1467. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +4 -4
  1468. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/recursive_mutex.hpp +11 -8
  1469. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +39 -10
  1470. data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +15 -11
  1471. data/src/cxx_supportlib/vendor-modified/boost/thread/shared_mutex.hpp +1 -0
  1472. data/src/cxx_supportlib/vendor-modified/boost/thread/sync_bounded_queue.hpp +2 -580
  1473. data/src/cxx_supportlib/vendor-modified/boost/thread/sync_queue.hpp +2 -502
  1474. data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +78 -11
  1475. data/src/cxx_supportlib/vendor-modified/boost/thread/testable_mutex.hpp +4 -0
  1476. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_pool.hpp +15 -0
  1477. data/src/cxx_supportlib/vendor-modified/boost/thread/tss.hpp +8 -8
  1478. data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +202 -0
  1479. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +6 -6
  1480. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/thread.hpp +73 -1
  1481. data/src/cxx_supportlib/vendor-modified/boost/thread/with_lock_guard.hpp +234 -0
  1482. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +7 -5
  1483. data/src/cxx_supportlib/vendor-modified/boost/token_functions.hpp +3 -17
  1484. data/src/cxx_supportlib/vendor-modified/boost/token_iterator.hpp +14 -14
  1485. data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +14 -5
  1486. data/src/cxx_supportlib/vendor-modified/boost/tuple/tuple.hpp +1 -24
  1487. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_const.hpp +9 -10
  1488. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_cv.hpp +2 -9
  1489. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_lvalue_reference.hpp +8 -7
  1490. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_pointer.hpp +6 -17
  1491. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +14 -62
  1492. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_rvalue_reference.hpp +5 -7
  1493. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_volatile.hpp +2 -9
  1494. data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +134 -9
  1495. data/src/cxx_supportlib/vendor-modified/boost/type_traits/alignment_of.hpp +9 -18
  1496. data/src/cxx_supportlib/vendor-modified/boost/type_traits/{detail/wrap.hpp → alignment_traits.hpp} +7 -10
  1497. data/src/cxx_supportlib/vendor-modified/boost/type_traits/arithmetic_traits.hpp +20 -0
  1498. data/src/cxx_supportlib/vendor-modified/boost/type_traits/array_traits.hpp +15 -0
  1499. data/src/cxx_supportlib/vendor-modified/boost/type_traits/broken_compiler_spec.hpp +9 -105
  1500. data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +118 -131
  1501. data/src/cxx_supportlib/vendor-modified/boost/type_traits/conditional.hpp +20 -0
  1502. data/src/cxx_supportlib/vendor-modified/boost/type_traits/config.hpp +5 -60
  1503. data/src/cxx_supportlib/vendor-modified/boost/type_traits/copy_cv.hpp +34 -0
  1504. data/src/cxx_supportlib/vendor-modified/boost/type_traits/decay.hpp +12 -13
  1505. data/src/cxx_supportlib/vendor-modified/boost/type_traits/declval.hpp +44 -0
  1506. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/bool_trait_def.hpp +9 -26
  1507. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/bool_trait_undef.hpp +2 -2
  1508. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +212 -0
  1509. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_type_impl.hpp +107 -0
  1510. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/composite_member_pointer_type.hpp +113 -0
  1511. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/composite_pointer_type.hpp +153 -0
  1512. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/config.hpp +72 -0
  1513. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_binary_operator.hpp +12 -19
  1514. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_postfix_operator.hpp +12 -19
  1515. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_prefix_operator.hpp +14 -19
  1516. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_and.hpp +7 -0
  1517. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_eq.hpp +7 -0
  1518. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_not.hpp +7 -0
  1519. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_or.hpp +7 -0
  1520. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +13 -57
  1521. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_tester.hpp +13 -218
  1522. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +13 -107
  1523. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +15 -974
  1524. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +56 -0
  1525. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/template_arity_spec.hpp +6 -21
  1526. data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +138 -0
  1527. data/src/cxx_supportlib/vendor-modified/boost/type_traits/floating_point_promotion.hpp +20 -0
  1528. data/src/cxx_supportlib/vendor-modified/boost/type_traits/function_traits.hpp +0 -62
  1529. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_and.hpp +49 -0
  1530. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_and_assign.hpp +55 -0
  1531. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_or.hpp +49 -0
  1532. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_or_assign.hpp +55 -0
  1533. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_xor.hpp +49 -0
  1534. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_xor_assign.hpp +55 -0
  1535. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_complement.hpp +32 -0
  1536. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_dereference.hpp +31 -0
  1537. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_divides.hpp +40 -0
  1538. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_divides_assign.hpp +47 -0
  1539. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_equal_to.hpp +49 -0
  1540. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater.hpp +49 -0
  1541. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater_equal.hpp +49 -0
  1542. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_left_shift.hpp +19 -19
  1543. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_left_shift_assign.hpp +55 -0
  1544. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less.hpp +49 -0
  1545. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less_equal.hpp +49 -0
  1546. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_and.hpp +40 -0
  1547. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_not.hpp +32 -0
  1548. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_or.hpp +40 -0
  1549. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus.hpp +60 -0
  1550. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus_assign.hpp +65 -0
  1551. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_modulus.hpp +49 -0
  1552. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_modulus_assign.hpp +55 -0
  1553. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_multiplies.hpp +40 -0
  1554. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_multiplies_assign.hpp +47 -0
  1555. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_negate.hpp +25 -0
  1556. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_new_operator.hpp +147 -0
  1557. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_not_equal_to.hpp +49 -0
  1558. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +57 -18
  1559. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +43 -24
  1560. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_copy.hpp +52 -23
  1561. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +47 -0
  1562. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_operator.hpp +51 -0
  1563. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus.hpp +54 -0
  1564. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus_assign.hpp +66 -0
  1565. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_decrement.hpp +44 -0
  1566. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_increment.hpp +44 -0
  1567. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_decrement.hpp +44 -0
  1568. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_increment.hpp +44 -0
  1569. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_right_shift.hpp +19 -19
  1570. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_right_shift_assign.hpp +55 -0
  1571. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +23 -29
  1572. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_constructor.hpp +31 -25
  1573. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +34 -36
  1574. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +21 -22
  1575. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +40 -25
  1576. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +45 -25
  1577. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_unary_minus.hpp +25 -0
  1578. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_unary_plus.hpp +23 -0
  1579. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_virtual_destructor.hpp +26 -0
  1580. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +86 -33
  1581. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_promotion.hpp +181 -0
  1582. data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +116 -41
  1583. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +6 -10
  1584. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_arithmetic.hpp +3 -32
  1585. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +12 -60
  1586. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +76 -0
  1587. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_and_derived.hpp +9 -19
  1588. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_of.hpp +8 -20
  1589. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_of_tr1.hpp +37 -0
  1590. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_class.hpp +17 -43
  1591. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complex.hpp +24 -0
  1592. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_compound.hpp +2 -24
  1593. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +8 -127
  1594. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_constructible.hpp +80 -0
  1595. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_convertible.hpp +94 -98
  1596. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_assignable.hpp +141 -0
  1597. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_constructible.hpp +187 -0
  1598. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +64 -0
  1599. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +60 -0
  1600. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_empty.hpp +8 -117
  1601. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_enum.hpp +19 -42
  1602. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_final.hpp +30 -0
  1603. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_float.hpp +2 -9
  1604. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_floating_point.hpp +12 -9
  1605. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_function.hpp +9 -18
  1606. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_fundamental.hpp +2 -21
  1607. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +43 -37
  1608. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_lvalue_reference.hpp +8 -76
  1609. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_function_pointer.hpp +18 -34
  1610. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_object_pointer.hpp +24 -0
  1611. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_pointer.hpp +8 -79
  1612. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +32 -35
  1613. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +43 -41
  1614. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_object.hpp +7 -32
  1615. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +14 -101
  1616. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pointer.hpp +12 -127
  1617. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_polymorphic.hpp +122 -0
  1618. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_reference.hpp +6 -21
  1619. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +4 -8
  1620. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_same.hpp +4 -66
  1621. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_scalar.hpp +3 -31
  1622. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_signed.hpp +83 -60
  1623. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_stateless.hpp +8 -23
  1624. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_union.hpp +6 -32
  1625. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_unsigned.hpp +85 -57
  1626. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +105 -0
  1627. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_void.hpp +7 -19
  1628. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +8 -115
  1629. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_signed.hpp +35 -57
  1630. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_unsigned.hpp +34 -57
  1631. data/src/cxx_supportlib/vendor-modified/boost/type_traits/promote.hpp +20 -0
  1632. data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +86 -0
  1633. data/src/cxx_supportlib/vendor-modified/boost/type_traits/reference_traits.hpp +15 -0
  1634. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +35 -0
  1635. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_bounds.hpp +4 -31
  1636. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +8 -65
  1637. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +13 -57
  1638. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +35 -0
  1639. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +8 -23
  1640. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_reference.hpp +5 -21
  1641. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +7 -61
  1642. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_identity.hpp +22 -0
  1643. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +101 -239
  1644. data/src/cxx_supportlib/vendor-modified/boost/typeof/dmc/typeof_impl.hpp +100 -0
  1645. data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode.hpp +61 -0
  1646. data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode_params.hpp +34 -0
  1647. data/src/cxx_supportlib/vendor-modified/boost/typeof/incr_registration_group.hpp +14 -0
  1648. data/src/cxx_supportlib/vendor-modified/boost/typeof/int_encoding.hpp +118 -0
  1649. data/src/cxx_supportlib/vendor-modified/boost/typeof/integral_template_param.hpp +80 -0
  1650. data/src/cxx_supportlib/vendor-modified/boost/typeof/modifiers.hpp +121 -0
  1651. data/src/cxx_supportlib/vendor-modified/boost/typeof/msvc/typeof_impl.hpp +283 -0
  1652. data/src/cxx_supportlib/vendor-modified/boost/typeof/pointers_data_members.hpp +38 -0
  1653. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions.hpp +50 -0
  1654. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions_iterate.hpp +135 -0
  1655. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_fundamental.hpp +62 -0
  1656. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_mem_functions.hpp +32 -0
  1657. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/bitset.hpp +15 -0
  1658. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/complex.hpp +15 -0
  1659. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/deque.hpp +17 -0
  1660. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/fstream.hpp +27 -0
  1661. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +55 -0
  1662. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iostream.hpp +18 -0
  1663. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/istream.hpp +21 -0
  1664. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iterator.hpp +58 -0
  1665. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/list.hpp +17 -0
  1666. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/locale.hpp +40 -0
  1667. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/map.hpp +23 -0
  1668. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +17 -0
  1669. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/ostream.hpp +18 -0
  1670. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/queue.hpp +17 -0
  1671. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/set.hpp +22 -0
  1672. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/sstream.hpp +32 -0
  1673. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/stack.hpp +17 -0
  1674. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/streambuf.hpp +17 -0
  1675. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/string.hpp +24 -0
  1676. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/utility.hpp +15 -0
  1677. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/valarray.hpp +21 -0
  1678. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/vector.hpp +17 -0
  1679. data/src/cxx_supportlib/vendor-modified/boost/typeof/template_encoding.hpp +160 -0
  1680. data/src/cxx_supportlib/vendor-modified/boost/typeof/template_template_param.hpp +149 -0
  1681. data/src/cxx_supportlib/vendor-modified/boost/typeof/type_encoding.hpp +27 -0
  1682. data/src/cxx_supportlib/vendor-modified/boost/typeof/type_template_param.hpp +37 -0
  1683. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +186 -0
  1684. data/src/cxx_supportlib/vendor-modified/boost/typeof/unsupported.hpp +29 -0
  1685. data/src/cxx_supportlib/vendor-modified/boost/typeof/vector.hpp +166 -0
  1686. data/src/cxx_supportlib/vendor-modified/boost/typeof/vector100.hpp +321 -0
  1687. data/src/cxx_supportlib/vendor-modified/boost/typeof/vector150.hpp +471 -0
  1688. data/src/cxx_supportlib/vendor-modified/boost/typeof/vector200.hpp +621 -0
  1689. data/src/cxx_supportlib/vendor-modified/boost/typeof/vector50.hpp +171 -0
  1690. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +42 -34
  1691. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +108 -56
  1692. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +30 -24
  1693. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +21 -16
  1694. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +3 -3
  1695. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +45 -33
  1696. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +21 -15
  1697. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +8 -2
  1698. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +11 -6
  1699. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +3 -3
  1700. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +11 -6
  1701. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +3 -3
  1702. data/src/cxx_supportlib/vendor-modified/boost/unordered_map.hpp +3 -2
  1703. data/src/cxx_supportlib/vendor-modified/boost/unordered_set.hpp +3 -2
  1704. data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +21 -0
  1705. data/src/cxx_supportlib/vendor-modified/boost/utility/addressof.hpp +11 -96
  1706. data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +171 -0
  1707. data/src/cxx_supportlib/vendor-modified/boost/utility/binary.hpp +708 -0
  1708. data/src/cxx_supportlib/vendor-modified/boost/utility/declval.hpp +5 -41
  1709. data/src/cxx_supportlib/vendor-modified/boost/utility/detail/result_of_iterate.hpp +18 -5
  1710. data/src/cxx_supportlib/vendor-modified/boost/utility/empty_deleter.hpp +43 -0
  1711. data/src/cxx_supportlib/vendor-modified/boost/utility/enable_if.hpp +10 -112
  1712. data/src/cxx_supportlib/vendor-modified/boost/utility/explicit_operator_bool.hpp +17 -0
  1713. data/src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp +46 -0
  1714. data/src/cxx_supportlib/vendor-modified/boost/utility/in_place_factory.hpp +2 -4
  1715. data/src/cxx_supportlib/vendor-modified/boost/utility/result_of.hpp +25 -9
  1716. data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +536 -0
  1717. data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref_fwd.hpp +37 -0
  1718. data/src/cxx_supportlib/vendor-modified/boost/utility/swap.hpp +10 -48
  1719. data/src/cxx_supportlib/vendor-modified/boost/utility/typed_in_place_factory.hpp +77 -0
  1720. data/src/cxx_supportlib/vendor-modified/boost/utility/value_init.hpp +281 -0
  1721. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +6 -6
  1722. data/src/cxx_supportlib/vendor-modified/boost/visit_each.hpp +0 -2
  1723. data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +3 -1
  1724. data/src/nginx_module/Configuration.c +157 -6
  1725. data/src/nginx_module/Configuration.h +3 -1
  1726. data/src/nginx_module/ContentHandler.c +2 -1
  1727. data/src/nginx_module/ngx_http_passenger_module.c +27 -46
  1728. data/src/nodejs_supportlib/phusion_passenger/log_express.js +1 -1
  1729. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  1730. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +102 -0
  1731. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +20 -3
  1732. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +36 -3
  1733. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -0
  1734. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +3 -1
  1735. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/LICENSE.md +1 -1
  1736. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +7 -0
  1737. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +28 -0
  1738. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb +4 -0
  1739. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb +18 -0
  1740. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +1 -10
  1741. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +4 -4
  1742. metadata +609 -62
  1743. data/src/agent/UstRouter/DataStoreId.h +0 -184
  1744. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.0 +0 -15374
  1745. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.1 +0 -15374
  1746. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.2 +0 -15374
  1747. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/requests +0 -568
  1748. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.0 +0 -3104
  1749. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.1 +0 -3104
  1750. data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.2 +0 -699
  1751. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/base.hpp +0 -585
  1752. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas32strong.hpp +0 -885
  1753. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas32weak.hpp +0 -947
  1754. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas64strong.hpp +0 -443
  1755. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-alpha.hpp +0 -368
  1756. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-armv6plus.hpp +0 -252
  1757. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-cas.hpp +0 -157
  1758. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-ppc.hpp +0 -2850
  1759. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-sparcv9.hpp +0 -1259
  1760. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-x86.hpp +0 -1766
  1761. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/generic-cas.hpp +0 -206
  1762. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/linux-arm.hpp +0 -189
  1763. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type-classification.hpp +0 -45
  1764. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithms.hpp +0 -84
  1765. data/src/cxx_supportlib/vendor-modified/boost/container/detail/memory_util.hpp +0 -83
  1766. data/src/cxx_supportlib/vendor-modified/boost/container/detail/preprocessor.hpp +0 -232
  1767. data/src/cxx_supportlib/vendor-modified/boost/container/detail/utilities.hpp +0 -1141
  1768. data/src/cxx_supportlib/vendor-modified/boost/detail/is_incrementable.hpp +0 -134
  1769. data/src/cxx_supportlib/vendor-modified/boost/detail/is_xxx.hpp +0 -61
  1770. data/src/cxx_supportlib/vendor-modified/boost/detail/limits.hpp +0 -449
  1771. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/attribute_noreturn.hpp +0 -17
  1772. data/src/cxx_supportlib/vendor-modified/boost/indirect_reference.hpp +0 -43
  1773. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/clear_on_destructor_base.hpp +0 -36
  1774. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/memory_util.hpp +0 -288
  1775. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/preprocessor.hpp +0 -52
  1776. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/utilities.hpp +0 -858
  1777. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set_hook.hpp +0 -292
  1778. data/src/cxx_supportlib/vendor-modified/boost/libs/atomic/lockpool.cpp +0 -24
  1779. data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/local_free_on_destruction.hpp +0 -40
  1780. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/timeconv.inl +0 -151
  1781. data/src/cxx_supportlib/vendor-modified/boost/math/common_factor_ct.hpp +0 -180
  1782. data/src/cxx_supportlib/vendor-modified/boost/math_fwd.hpp +0 -108
  1783. data/src/cxx_supportlib/vendor-modified/boost/parameter.hpp +0 -21
  1784. data/src/cxx_supportlib/vendor-modified/boost/pointee.hpp +0 -74
  1785. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/allocate_array_helper.hpp +0 -169
  1786. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_deleter.hpp +0 -124
  1787. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/make_array_helper.hpp +0 -157
  1788. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/async_func.hpp +0 -571
  1789. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_type_imp.hpp +0 -333
  1790. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/cv_traits_impl.hpp +0 -97
  1791. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/false_result.hpp +0 -28
  1792. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/size_t_trait_def.hpp +0 -60
  1793. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/size_t_trait_undef.hpp +0 -16
  1794. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/type_trait_def.hpp +0 -67
  1795. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/type_trait_undef.hpp +0 -19
  1796. data/src/cxx_supportlib/vendor-modified/boost/units/detail/utility.hpp +0 -104
@@ -11,13 +11,17 @@
11
11
  #ifndef BOOST_CONTAINER_THROW_EXCEPTION_HPP
12
12
  #define BOOST_CONTAINER_THROW_EXCEPTION_HPP
13
13
 
14
- #include <boost/container/detail/config_begin.hpp>
15
- #include <boost/container/detail/workaround.hpp>
14
+ #ifndef BOOST_CONFIG_HPP
15
+ # include <boost/config.hpp>
16
+ #endif
16
17
 
17
- #if (defined _MSC_VER) && (_MSC_VER >= 1200)
18
+ #if defined(BOOST_HAS_PRAGMA_ONCE)
18
19
  # pragma once
19
20
  #endif
20
21
 
22
+ #include <boost/container/detail/config_begin.hpp>
23
+ #include <boost/container/detail/workaround.hpp>
24
+
21
25
  #ifndef BOOST_NO_EXCEPTIONS
22
26
  #include <stdexcept> //for std exception types
23
27
  #include <new> //for std::bad_alloc
@@ -76,26 +80,82 @@ namespace container {
76
80
 
77
81
  #else //defined(BOOST_NO_EXCEPTIONS)
78
82
 
83
+ //! Exception callback called by Boost.Container when fails to allocate the requested storage space.
84
+ //! <ul>
85
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::bad_alloc()</code> is thrown.</li>
86
+ //!
87
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
88
+ //! is NOT defined <code>BOOST_ASSERT(!"boost::container bad_alloc thrown")</code> is called
89
+ //! and <code>std::abort()</code> if the former returns.</li>
90
+ //!
91
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
92
+ //! the user must provide an implementation and the function should not return.</li>
93
+ //! </ul>
79
94
  inline void throw_bad_alloc()
80
95
  {
81
96
  throw std::bad_alloc();
82
97
  }
83
98
 
99
+ //! Exception callback called by Boost.Container to signal arguments out of range.
100
+ //! <ul>
101
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::out_of_range(str)</code> is thrown.</li>
102
+ //!
103
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
104
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str)</code> is called
105
+ //! and <code>std::abort()</code> if the former returns.</li>
106
+ //!
107
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
108
+ //! the user must provide an implementation and the function should not return.</li>
109
+ //! </ul>
84
110
  inline void throw_out_of_range(const char* str)
85
111
  {
86
112
  throw std::out_of_range(str);
87
113
  }
88
114
 
115
+ //! Exception callback called by Boost.Container to signal errors resizing.
116
+ //! <ul>
117
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::length_error(str)</code> is thrown.</li>
118
+ //!
119
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
120
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container length_error thrown", str)</code> is called
121
+ //! and <code>std::abort()</code> if the former returns.</li>
122
+ //!
123
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
124
+ //! the user must provide an implementation and the function should not return.</li>
125
+ //! </ul>
89
126
  inline void throw_length_error(const char* str)
90
127
  {
91
128
  throw std::length_error(str);
92
129
  }
93
130
 
131
+ //! Exception callback called by Boost.Container to report errors in the internal logical
132
+ //! of the program, such as violation of logical preconditions or class invariants.
133
+ //! <ul>
134
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::logic_error(str)</code> is thrown.</li>
135
+ //!
136
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
137
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str)</code> is called
138
+ //! and <code>std::abort()</code> if the former returns.</li>
139
+ //!
140
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
141
+ //! the user must provide an implementation and the function should not return.</li>
142
+ //! </ul>
94
143
  inline void throw_logic_error(const char* str)
95
144
  {
96
145
  throw std::logic_error(str);
97
146
  }
98
147
 
148
+ //! Exception callback called by Boost.Container to report errors that can only be detected during runtime.
149
+ //! <ul>
150
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::runtime_error(str)</code> is thrown.</li>
151
+ //!
152
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
153
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str)</code> is called
154
+ //! and <code>std::abort()</code> if the former returns.</li>
155
+ //!
156
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
157
+ //! the user must provide an implementation and the function should not return.</li>
158
+ //! </ul>
99
159
  inline void throw_runtime_error(const char* str)
100
160
  {
101
161
  throw std::runtime_error(str);
@@ -0,0 +1,169 @@
1
+ //////////////////////////////////////////////////////////////////////////////
2
+ //
3
+ // (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
4
+ // Software License, Version 1.0. (See accompanying file
5
+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
+ //
7
+ // See http://www.boost.org/libs/container for documentation.
8
+ //
9
+ //////////////////////////////////////////////////////////////////////////////
10
+
11
+ #ifndef BOOST_CONTAINER_USES_ALLOCATOR_HPP
12
+ #define BOOST_CONTAINER_USES_ALLOCATOR_HPP
13
+
14
+ #include <boost/container/uses_allocator_fwd.hpp>
15
+ #include <boost/container/detail/type_traits.hpp>
16
+
17
+ namespace boost {
18
+ namespace container {
19
+
20
+ //! <b>Remark</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, indicates that T may be constructed
21
+ //! with an allocator as its last constructor argument. Ideally, all constructors of T (including the
22
+ //! copy and move constructors) should have a variant that accepts a final argument of
23
+ //! allocator_type.
24
+ //!
25
+ //! <b>Requires</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, T must have a nested type,
26
+ //! allocator_type and at least one constructor for which allocator_type is the last
27
+ //! parameter. If not all constructors of T can be called with a final allocator_type argument,
28
+ //! and if T is used in a context where a container must call such a constructor, then the program is
29
+ //! ill-formed.
30
+ //!
31
+ //! <code>
32
+ //! template <class T, class Allocator = allocator<T> >
33
+ //! class Z {
34
+ //! public:
35
+ //! typedef Allocator allocator_type;
36
+ //!
37
+ //! // Default constructor with optional allocator suffix
38
+ //! Z(const allocator_type& a = allocator_type());
39
+ //!
40
+ //! // Copy constructor and allocator-extended copy constructor
41
+ //! Z(const Z& zz);
42
+ //! Z(const Z& zz, const allocator_type& a);
43
+ //! };
44
+ //!
45
+ //! // Specialize trait for class template Z
46
+ //! template <class T, class Allocator = allocator<T> >
47
+ //! struct constructible_with_allocator_suffix<Z<T,Allocator> >
48
+ //! { static const bool value = true; };
49
+ //! </code>
50
+ //!
51
+ //! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped A Model (Rev 2)"
52
+ //! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
53
+ //! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
54
+ //! Applications aiming portability with several compilers should always define this trait.
55
+ //!
56
+ //! In conforming C++11 compilers or compilers supporting SFINAE expressions
57
+ //! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
58
+ //! to detect if a type should be constructed with suffix or prefix allocator arguments.
59
+ template <class T>
60
+ struct constructible_with_allocator_suffix
61
+ { static const bool value = false; };
62
+
63
+ //! <b>Remark</b>: if a specialization constructible_with_allocator_prefix<X>::value is true, indicates that T may be constructed
64
+ //! with allocator_arg and T::allocator_type as its first two constructor arguments.
65
+ //! Ideally, all constructors of T (including the copy and move constructors) should have a variant
66
+ //! that accepts these two initial arguments.
67
+ //!
68
+ //! <b>Requires</b>: specialization constructible_with_allocator_prefix<X>::value is true, T must have a nested type,
69
+ //! allocator_type and at least one constructor for which allocator_arg_t is the first
70
+ //! parameter and allocator_type is the second parameter. If not all constructors of T can be
71
+ //! called with these initial arguments, and if T is used in a context where a container must call such
72
+ //! a constructor, then the program is ill-formed.
73
+ //!
74
+ //! <code>
75
+ //! template <class T, class Allocator = allocator<T> >
76
+ //! class Y {
77
+ //! public:
78
+ //! typedef Allocator allocator_type;
79
+ //!
80
+ //! // Default constructor with and allocator-extended default constructor
81
+ //! Y();
82
+ //! Y(allocator_arg_t, const allocator_type& a);
83
+ //!
84
+ //! // Copy constructor and allocator-extended copy constructor
85
+ //! Y(const Y& yy);
86
+ //! Y(allocator_arg_t, const allocator_type& a, const Y& yy);
87
+ //!
88
+ //! // Variadic constructor and allocator-extended variadic constructor
89
+ //! template<class ...Args> Y(Args&& args...);
90
+ //! template<class ...Args>
91
+ //! Y(allocator_arg_t, const allocator_type& a, BOOST_FWD_REF(Args)... args);
92
+ //! };
93
+ //!
94
+ //! // Specialize trait for class template Y
95
+ //! template <class T, class Allocator = allocator<T> >
96
+ //! struct constructible_with_allocator_prefix<Y<T,Allocator> >
97
+ //! { static const bool value = true; };
98
+ //!
99
+ //! </code>
100
+ //!
101
+ //! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped Allocator Model (Rev 2)"
102
+ //! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
103
+ //! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
104
+ //! Applications aiming portability with several compilers should always define this trait.
105
+ //!
106
+ //! In conforming C++11 compilers or compilers supporting SFINAE expressions
107
+ //! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
108
+ //! to detect if a type should be constructed with suffix or prefix allocator arguments.
109
+ template <class T>
110
+ struct constructible_with_allocator_prefix
111
+ { static const bool value = false; };
112
+
113
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
114
+
115
+ namespace container_detail {
116
+
117
+ template<typename T, typename Allocator>
118
+ struct uses_allocator_imp
119
+ {
120
+ // Use SFINAE (Substitution Failure Is Not An Error) to detect the
121
+ // presence of an 'allocator_type' nested type convertilble from Allocator.
122
+ private:
123
+ typedef char yes_type;
124
+ struct no_type{ char dummy[2]; };
125
+
126
+ // Match this function if T::allocator_type exists and is
127
+ // implicitly convertible from Allocator
128
+ template <class U>
129
+ static yes_type test(typename U::allocator_type);
130
+
131
+ // Match this function if T::allocator_type exists and it's type is `erased_type`.
132
+ template <class U, class V>
133
+ static typename container_detail::enable_if
134
+ < container_detail::is_same<typename U::allocator_type, erased_type>
135
+ , yes_type
136
+ >::type test(const V&);
137
+
138
+ // Match this function if TypeT::allocator_type does not exist or is
139
+ // not convertible from Allocator.
140
+ template <typename U>
141
+ static no_type test(...);
142
+ static Allocator alloc; // Declared but not defined
143
+
144
+ public:
145
+ static const bool value = sizeof(test<T>(alloc)) == sizeof(yes_type);
146
+ };
147
+
148
+ } //namespace container_detail {
149
+
150
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
151
+
152
+ //! <b>Remark</b>: Automatically detects whether T has a nested allocator_type that is convertible from
153
+ //! Allocator. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may
154
+ //! specialize this type to define uses_allocator<X>::value as true for a T of user-defined type if T does not
155
+ //! have a nested allocator_type but is nonetheless constructible using the specified Allocator where either:
156
+ //! the first argument of a constructor has type allocator_arg_t and the second argument has type Alloc or
157
+ //! the last argument of a constructor has type Alloc.
158
+ //!
159
+ //! <b>Result</b>: uses_allocator<T, Allocator>::value== true if a type T::allocator_type
160
+ //! exists and either is_convertible<Alloc, T::allocator_type>::value != false or T::allocator_type
161
+ //! is an alias `erased_type`. False otherwise.
162
+ template <typename T, typename Allocator>
163
+ struct uses_allocator
164
+ : container_detail::uses_allocator_imp<T, Allocator>
165
+ {};
166
+
167
+ }} //namespace boost::container
168
+
169
+ #endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
@@ -0,0 +1,73 @@
1
+ //////////////////////////////////////////////////////////////////////////////
2
+ //
3
+ // (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
4
+ // Software License, Version 1.0. (See accompanying file
5
+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
+ //
7
+ // See http://www.boost.org/libs/container for documentation.
8
+ //
9
+ //////////////////////////////////////////////////////////////////////////////
10
+
11
+ #ifndef BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
12
+ #define BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
13
+
14
+ #include <boost/container/detail/workaround.hpp>
15
+ #include <boost/container/detail/std_fwd.hpp>
16
+
17
+ //! \file
18
+ //! This header forward declares boost::container::constructible_with_allocator_prefix,
19
+ //! boost::container::constructible_with_allocator_suffix and
20
+ //! boost::container::uses_allocator. Also defines the following types:
21
+
22
+ namespace boost {
23
+ namespace container {
24
+
25
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
26
+
27
+ template <int Dummy = 0>
28
+ struct std_allocator_arg_holder
29
+ {
30
+ static ::std::allocator_arg_t *dummy;
31
+ };
32
+
33
+ template <int Dummy>
34
+ ::std::allocator_arg_t *std_allocator_arg_holder<Dummy>::dummy;
35
+
36
+ typedef const std::allocator_arg_t & allocator_arg_t;
37
+
38
+ #else
39
+
40
+ //! The allocator_arg_t struct is an empty structure type used as a unique type to
41
+ //! disambiguate constructor and function overloading. Specifically, several types
42
+ //! have constructors with allocator_arg_t as the first argument, immediately followed
43
+ //! by an argument of a type that satisfies Allocator requirements
44
+ typedef unspecified allocator_arg_t;
45
+
46
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
47
+
48
+ //! The `erased_type` struct is an empty struct that serves as a placeholder for a type
49
+ //! T in situations where the actual type T is determined at runtime. For example,
50
+ //! the nested type, `allocator_type`, is an alias for `erased_type` in classes that
51
+ //! use type-erased allocators.
52
+ struct erased_type {};
53
+
54
+ //! A instance of type
55
+ //! allocator_arg_t
56
+ static allocator_arg_t allocator_arg = BOOST_CONTAINER_DOC1ST(unspecified, *std_allocator_arg_holder<>::dummy);
57
+
58
+ // @cond
59
+
60
+ template <class T>
61
+ struct constructible_with_allocator_suffix;
62
+
63
+ template <class T>
64
+ struct constructible_with_allocator_prefix;
65
+
66
+ template <typename T, typename Allocator>
67
+ struct uses_allocator;
68
+
69
+ // @endcond
70
+
71
+ }} // namespace boost { namespace container {
72
+
73
+ #endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
@@ -1,6 +1,6 @@
1
1
  //////////////////////////////////////////////////////////////////////////////
2
2
  //
3
- // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
3
+ // (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
4
4
  // Software License, Version 1.0. (See accompanying file
5
5
  // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
6
  //
@@ -11,49 +11,63 @@
11
11
  #ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
12
12
  #define BOOST_CONTAINER_CONTAINER_VECTOR_HPP
13
13
 
14
- #if (defined _MSC_VER) && (_MSC_VER >= 1200)
14
+ #ifndef BOOST_CONFIG_HPP
15
+ # include <boost/config.hpp>
16
+ #endif
17
+
18
+ #if defined(BOOST_HAS_PRAGMA_ONCE)
15
19
  # pragma once
16
20
  #endif
17
21
 
18
22
  #include <boost/container/detail/config_begin.hpp>
19
23
  #include <boost/container/detail/workaround.hpp>
20
- #include <boost/container/container_fwd.hpp>
21
24
 
22
- #include <cstddef>
23
- #include <memory>
24
- #include <algorithm>
25
- #include <iterator>
26
- #include <utility>
27
- #include <boost/detail/no_exceptions_support.hpp>
28
- #include <boost/type_traits/has_trivial_destructor.hpp>
29
- #include <boost/type_traits/has_trivial_copy.hpp>
30
- #include <boost/type_traits/has_trivial_assign.hpp>
31
- #include <boost/type_traits/has_nothrow_copy.hpp>
32
- #include <boost/type_traits/has_nothrow_assign.hpp>
33
- #include <boost/type_traits/has_nothrow_constructor.hpp>
25
+ // container
34
26
  #include <boost/container/container_fwd.hpp>
35
- #include <boost/container/detail/version_type.hpp>
36
- #include <boost/container/detail/allocation_type.hpp>
37
- #include <boost/container/detail/utilities.hpp>
38
- #include <boost/container/detail/iterators.hpp>
39
- #include <boost/container/detail/algorithms.hpp>
40
- #include <boost/container/detail/destroyers.hpp>
41
27
  #include <boost/container/allocator_traits.hpp>
42
- #include <boost/container/detail/allocator_version_traits.hpp>
28
+ #include <boost/container/new_allocator.hpp> //new_allocator
43
29
  #include <boost/container/throw_exception.hpp>
44
- #include <boost/move/utility.hpp>
45
- #include <boost/move/iterator.hpp>
46
- #include <boost/move/detail/move_helpers.hpp>
47
- #include <boost/intrusive/pointer_traits.hpp>
30
+ // container detail
31
+ #include <boost/container/detail/advanced_insert_int.hpp>
32
+ #include <boost/container/detail/algorithm.hpp> //equal()
33
+ #include <boost/container/detail/alloc_helpers.hpp>
34
+ #include <boost/container/detail/allocation_type.hpp>
35
+ #include <boost/container/detail/copy_move_algo.hpp>
36
+ #include <boost/container/detail/destroyers.hpp>
37
+ #include <boost/container/detail/iterator.hpp>
38
+ #include <boost/container/detail/iterators.hpp>
39
+ #include <boost/container/detail/iterator_to_raw_pointer.hpp>
48
40
  #include <boost/container/detail/mpl.hpp>
41
+ #include <boost/container/detail/next_capacity.hpp>
42
+ #include <boost/container/detail/to_raw_pointer.hpp>
49
43
  #include <boost/container/detail/type_traits.hpp>
50
- #include <boost/container/detail/advanced_insert_int.hpp>
44
+ #include <boost/container/detail/version_type.hpp>
45
+ // intrusive
46
+ #include <boost/intrusive/pointer_traits.hpp>
47
+ // move
48
+ #include <boost/move/adl_move_swap.hpp>
49
+ #include <boost/move/iterator.hpp>
50
+ #include <boost/move/traits.hpp>
51
+ #include <boost/move/utility_core.hpp>
52
+ // move/detail
53
+ #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
54
+ #include <boost/move/detail/fwd_macros.hpp>
55
+ #endif
56
+ #include <boost/move/detail/move_helpers.hpp>
57
+ // other
58
+ #include <boost/core/no_exceptions_support.hpp>
51
59
  #include <boost/assert.hpp>
60
+ #include <boost/cstdint.hpp>
61
+
62
+ //std
63
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
64
+ #include <initializer_list> //for std::initializer_list
65
+ #endif
52
66
 
53
67
  namespace boost {
54
68
  namespace container {
55
69
 
56
- /// @cond
70
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
57
71
 
58
72
  //#define BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
59
73
 
@@ -61,178 +75,183 @@ namespace container_detail {
61
75
 
62
76
  #ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
63
77
 
64
- //! Const vector_iterator used to iterate through a vector.
65
- template <class Pointer>
66
- class vector_const_iterator
78
+ template <class Pointer, bool IsConst>
79
+ class vec_iterator
67
80
  {
68
81
  public:
69
- typedef std::random_access_iterator_tag iterator_category;
82
+ typedef std::random_access_iterator_tag iterator_category;
70
83
  typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
71
84
  typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
72
- typedef typename boost::intrusive::pointer_traits<Pointer>::template
73
- rebind_pointer<const value_type>::type pointer;
74
- typedef const value_type& reference;
85
+ typedef typename if_c
86
+ < IsConst
87
+ , typename boost::intrusive::pointer_traits<Pointer>::template
88
+ rebind_pointer<const value_type>::type
89
+ , Pointer
90
+ >::type pointer;
91
+ typedef typename boost::intrusive::pointer_traits<pointer> ptr_traits;
92
+ typedef typename ptr_traits::reference reference;
75
93
 
76
- /// @cond
77
- protected:
94
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
95
+ private:
78
96
  Pointer m_ptr;
79
97
 
80
98
  public:
81
- const Pointer &get_ptr() const BOOST_CONTAINER_NOEXCEPT
99
+ const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
82
100
  { return m_ptr; }
83
101
 
84
- Pointer &get_ptr() BOOST_CONTAINER_NOEXCEPT
102
+ Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
85
103
  { return m_ptr; }
86
104
 
87
- explicit vector_const_iterator(Pointer ptr) BOOST_CONTAINER_NOEXCEPT
105
+ explicit vec_iterator(Pointer ptr) BOOST_NOEXCEPT_OR_NOTHROW
88
106
  : m_ptr(ptr)
89
107
  {}
90
- /// @endcond
108
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
91
109
 
92
110
  public:
93
111
 
94
112
  //Constructors
95
- vector_const_iterator() BOOST_CONTAINER_NOEXCEPT
96
- #ifndef NDEBUG
97
- : m_ptr()
98
- #else
99
- // No value initialization of m_ptr() to speed up things a bit:
100
- #endif
113
+ vec_iterator() BOOST_NOEXCEPT_OR_NOTHROW
114
+ : m_ptr() //Value initialization to achieve "null iterators" (N3644)
115
+ {}
116
+
117
+ vec_iterator(vec_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
118
+ : m_ptr(other.get_ptr())
101
119
  {}
102
120
 
103
121
  //Pointer like operators
104
- reference operator*() const BOOST_CONTAINER_NOEXCEPT
122
+ reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
105
123
  { return *m_ptr; }
106
124
 
107
- const value_type * operator->() const BOOST_CONTAINER_NOEXCEPT
108
- { return container_detail::to_raw_pointer(m_ptr); }
125
+ pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
126
+ { return ::boost::intrusive::pointer_traits<pointer>::pointer_to(this->operator*()); }
109
127
 
110
- reference operator[](difference_type off) const BOOST_CONTAINER_NOEXCEPT
128
+ reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
111
129
  { return m_ptr[off]; }
112
130
 
113
131
  //Increment / Decrement
114
- vector_const_iterator& operator++() BOOST_CONTAINER_NOEXCEPT
132
+ vec_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
115
133
  { ++m_ptr; return *this; }
116
134
 
117
- vector_const_iterator operator++(int) BOOST_CONTAINER_NOEXCEPT
118
- { return vector_const_iterator(m_ptr++); }
135
+ vec_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
136
+ { return vec_iterator(m_ptr++); }
119
137
 
120
- vector_const_iterator& operator--() BOOST_CONTAINER_NOEXCEPT
138
+ vec_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
121
139
  { --m_ptr; return *this; }
122
140
 
123
- vector_const_iterator operator--(int) BOOST_CONTAINER_NOEXCEPT
124
- { return vector_const_iterator(m_ptr--); }
141
+ vec_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
142
+ { return vec_iterator(m_ptr--); }
125
143
 
126
144
  //Arithmetic
127
- vector_const_iterator& operator+=(difference_type off) BOOST_CONTAINER_NOEXCEPT
145
+ vec_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
128
146
  { m_ptr += off; return *this; }
129
147
 
130
- vector_const_iterator& operator-=(difference_type off) BOOST_CONTAINER_NOEXCEPT
148
+ vec_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
131
149
  { m_ptr -= off; return *this; }
132
150
 
133
- friend vector_const_iterator operator+(const vector_const_iterator &x, difference_type off) BOOST_CONTAINER_NOEXCEPT
134
- { return vector_const_iterator(x.m_ptr+off); }
151
+ friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
152
+ { return vec_iterator(x.m_ptr+off); }
135
153
 
136
- friend vector_const_iterator operator+(difference_type off, vector_const_iterator right) BOOST_CONTAINER_NOEXCEPT
154
+ friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
137
155
  { right.m_ptr += off; return right; }
138
156
 
139
- friend vector_const_iterator operator-(vector_const_iterator left, difference_type off) BOOST_CONTAINER_NOEXCEPT
157
+ friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
140
158
  { left.m_ptr -= off; return left; }
141
159
 
142
- friend difference_type operator-(const vector_const_iterator &left, const vector_const_iterator& right) BOOST_CONTAINER_NOEXCEPT
160
+ friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
143
161
  { return left.m_ptr - right.m_ptr; }
144
162
 
145
163
  //Comparison operators
146
- friend bool operator== (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
164
+ friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
147
165
  { return l.m_ptr == r.m_ptr; }
148
166
 
149
- friend bool operator!= (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
167
+ friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
150
168
  { return l.m_ptr != r.m_ptr; }
151
169
 
152
- friend bool operator< (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
170
+ friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
153
171
  { return l.m_ptr < r.m_ptr; }
154
172
 
155
- friend bool operator<= (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
173
+ friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
156
174
  { return l.m_ptr <= r.m_ptr; }
157
175
 
158
- friend bool operator> (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
176
+ friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
159
177
  { return l.m_ptr > r.m_ptr; }
160
178
 
161
- friend bool operator>= (const vector_const_iterator& l, const vector_const_iterator& r) BOOST_CONTAINER_NOEXCEPT
179
+ friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
162
180
  { return l.m_ptr >= r.m_ptr; }
163
181
  };
164
182
 
165
- //! Iterator used to iterate through a vector
166
- template <class Pointer>
167
- class vector_iterator
168
- : public vector_const_iterator<Pointer>
183
+ template<class BiDirPosConstIt, class BiDirValueIt>
184
+ struct vector_insert_ordered_cursor
169
185
  {
170
- typedef vector_const_iterator<Pointer> base_t;
171
- public:
172
- explicit vector_iterator(Pointer ptr) BOOST_CONTAINER_NOEXCEPT
173
- : base_t(ptr)
174
- {}
186
+ typedef typename iterator_traits<BiDirPosConstIt>::value_type size_type;
187
+ typedef typename iterator_traits<BiDirValueIt>::reference reference;
175
188
 
176
- public:
177
- typedef std::random_access_iterator_tag iterator_category;
178
- typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
179
- typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
180
- typedef Pointer pointer;
181
- typedef value_type& reference;
182
-
183
- //Constructors
184
- vector_iterator() BOOST_CONTAINER_NOEXCEPT
185
- : base_t()
189
+ vector_insert_ordered_cursor(BiDirPosConstIt posit, BiDirValueIt valueit)
190
+ : last_position_it(posit), last_value_it(valueit)
186
191
  {}
187
192
 
188
- //Pointer like operators
189
- reference operator*() const BOOST_CONTAINER_NOEXCEPT
190
- { return *this->m_ptr; }
191
-
192
- value_type* operator->() const BOOST_CONTAINER_NOEXCEPT
193
- { return container_detail::to_raw_pointer(this->m_ptr); }
193
+ void operator --()
194
+ {
195
+ --last_value_it;
196
+ --last_position_it;
197
+ while(this->get_pos() == size_type(-1)){
198
+ --last_value_it;
199
+ --last_position_it;
200
+ }
201
+ }
194
202
 
195
- reference operator[](difference_type off) const BOOST_CONTAINER_NOEXCEPT
196
- { return this->m_ptr[off]; }
203
+ size_type get_pos() const
204
+ { return *last_position_it; }
197
205
 
198
- //Increment / Decrement
199
- vector_iterator& operator++() BOOST_CONTAINER_NOEXCEPT
200
- { ++this->m_ptr; return *this; }
206
+ reference get_val()
207
+ { return *last_value_it; }
201
208
 
202
- vector_iterator operator++(int) BOOST_CONTAINER_NOEXCEPT
203
- { return vector_iterator(this->m_ptr++); }
204
-
205
- vector_iterator& operator--() BOOST_CONTAINER_NOEXCEPT
206
- { --this->m_ptr; return *this; }
209
+ BiDirPosConstIt last_position_it;
210
+ BiDirValueIt last_value_it;
211
+ };
207
212
 
208
- vector_iterator operator--(int) BOOST_CONTAINER_NOEXCEPT
209
- { return vector_iterator(this->m_ptr--); }
213
+ template<class T, class SizeType, class BiDirValueIt, class Comp>
214
+ struct vector_merge_cursor
215
+ {
216
+ typedef SizeType size_type;
217
+ typedef typename iterator_traits<BiDirValueIt>::reference reference;
210
218
 
211
- // Arithmetic
212
- vector_iterator& operator+=(difference_type off) BOOST_CONTAINER_NOEXCEPT
213
- { this->m_ptr += off; return *this; }
219
+ vector_merge_cursor(T *pbeg, T *plast, BiDirValueIt valueit, Comp &cmp)
220
+ : m_pbeg(pbeg), m_pcur(--plast), m_valueit(valueit), m_cmp(cmp)
221
+ {}
214
222
 
215
- vector_iterator& operator-=(difference_type off) BOOST_CONTAINER_NOEXCEPT
216
- { this->m_ptr -= off; return *this; }
223
+ void operator --()
224
+ {
225
+ --m_valueit;
226
+ const T &t = *m_valueit;
227
+ while((m_pcur + 1) != m_pbeg){
228
+ if(!m_cmp(t, *m_pcur)){
229
+ break;
230
+ }
231
+ --m_pcur;
232
+ }
233
+ }
217
234
 
218
- friend vector_iterator operator+(vector_iterator left, difference_type off) BOOST_CONTAINER_NOEXCEPT
219
- { left.m_ptr += off; return left; }
235
+ size_type get_pos() const
236
+ { return static_cast<size_type>((m_pcur + 1) - m_pbeg); }
220
237
 
221
- friend vector_iterator operator+(difference_type off, vector_iterator right) BOOST_CONTAINER_NOEXCEPT
222
- { right.m_ptr += off; return right; }
238
+ reference get_val()
239
+ { return *m_valueit; }
223
240
 
224
- friend vector_iterator operator-(vector_iterator left, difference_type off) BOOST_CONTAINER_NOEXCEPT
225
- { left.m_ptr -= off; return left; }
241
+ T *const m_pbeg;
242
+ T *m_pcur;
243
+ BiDirValueIt m_valueit;
244
+ Comp &m_cmp;
226
245
  };
227
246
 
228
247
  } //namespace container_detail {
229
248
 
230
- template<class Pointer>
231
- const Pointer &vector_iterator_get_ptr(const container_detail::vector_const_iterator<Pointer> &it) BOOST_CONTAINER_NOEXCEPT
249
+ template<class Pointer, bool IsConst>
250
+ const Pointer &vector_iterator_get_ptr(const container_detail::vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
232
251
  { return it.get_ptr(); }
233
252
 
234
- template<class Pointer>
235
- Pointer &get_ptr(container_detail::vector_const_iterator<Pointer> &it) BOOST_CONTAINER_NOEXCEPT
253
+ template<class Pointer, bool IsConst>
254
+ Pointer &get_ptr(container_detail::vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
236
255
  { return it.get_ptr(); }
237
256
 
238
257
  namespace container_detail {
@@ -251,7 +270,7 @@ struct vector_get_ptr_pointer_to_non_const
251
270
  typedef typename pointer_traits_t
252
271
  ::template rebind_pointer<non_const_element_type>::type return_type;
253
272
 
254
- static return_type get_ptr(const const_pointer &ptr)
273
+ static return_type get_ptr(const const_pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
255
274
  { return boost::intrusive::pointer_traits<return_type>::const_cast_from(ptr); }
256
275
  };
257
276
 
@@ -259,7 +278,7 @@ template<class Pointer>
259
278
  struct vector_get_ptr_pointer_to_non_const<Pointer, false>
260
279
  {
261
280
  typedef const Pointer & return_type;
262
- static return_type get_ptr(const Pointer &ptr)
281
+ static return_type get_ptr(const Pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
263
282
  { return ptr; }
264
283
  };
265
284
 
@@ -267,7 +286,7 @@ struct vector_get_ptr_pointer_to_non_const<Pointer, false>
267
286
 
268
287
  template<class MaybeConstPointer>
269
288
  typename container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::return_type
270
- vector_iterator_get_ptr(const MaybeConstPointer &ptr) BOOST_CONTAINER_NOEXCEPT
289
+ vector_iterator_get_ptr(const MaybeConstPointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
271
290
  {
272
291
  return container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::get_ptr(ptr);
273
292
  }
@@ -276,46 +295,40 @@ namespace container_detail {
276
295
 
277
296
  #endif //#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
278
297
 
279
- template <class T, class Allocator>
280
- struct vector_value_traits
298
+ struct uninitialized_size_t {};
299
+ static const uninitialized_size_t uninitialized_size = uninitialized_size_t();
300
+
301
+ template <class T>
302
+ struct vector_value_traits_base
281
303
  {
282
- typedef T value_type;
283
- typedef Allocator allocator_type;
284
- static const bool trivial_dctr = boost::has_trivial_destructor<value_type>::value;
285
- static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
286
- static const bool trivial_copy = has_trivial_copy<value_type>::value;
287
- static const bool nothrow_copy = has_nothrow_copy<value_type>::value || trivial_copy;
288
- static const bool trivial_assign = has_trivial_assign<value_type>::value;
289
- static const bool nothrow_assign = has_nothrow_assign<value_type>::value || trivial_assign;
304
+ static const bool trivial_dctr = is_trivially_destructible<T>::value;
305
+ static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
306
+ static const bool trivial_copy = is_trivially_copy_constructible<T>::value;
307
+ static const bool nothrow_copy = is_nothrow_copy_constructible<T>::value || trivial_copy;
308
+ static const bool trivial_assign = is_trivially_copy_assignable<T>::value;
309
+ static const bool nothrow_assign = is_nothrow_copy_assignable<T>::value || trivial_assign;
310
+ };
311
+
290
312
 
313
+ template <class Allocator>
314
+ struct vector_value_traits
315
+ : public vector_value_traits_base<typename Allocator::value_type>
316
+ {
317
+ typedef vector_value_traits_base<typename Allocator::value_type> base_t;
291
318
  //This is the anti-exception array destructor
292
319
  //to deallocate values already constructed
293
320
  typedef typename container_detail::if_c
294
- <trivial_dctr
295
- ,container_detail::null_scoped_destructor_n<Allocator>
296
- ,container_detail::scoped_destructor_n<Allocator>
297
- >::type OldArrayDestructor;
298
- //This is the anti-exception array destructor
299
- //to destroy objects created with copy construction
300
- typedef typename container_detail::if_c
301
- <nothrow_copy
321
+ <base_t::trivial_dctr
302
322
  ,container_detail::null_scoped_destructor_n<Allocator>
303
323
  ,container_detail::scoped_destructor_n<Allocator>
304
324
  >::type ArrayDestructor;
305
325
  //This is the anti-exception array deallocator
306
- typedef typename container_detail::if_c
307
- <nothrow_copy
308
- ,container_detail::null_scoped_array_deallocator<Allocator>
309
- ,container_detail::scoped_array_deallocator<Allocator>
310
- >::type ArrayDeallocator;
326
+ typedef container_detail::scoped_array_deallocator<Allocator> ArrayDeallocator;
311
327
  };
312
328
 
313
329
  //!This struct deallocates and allocated memory
314
330
  template < class Allocator
315
- , class AllocatorVersion = container_detail::integral_constant
316
- < unsigned
317
- , boost::container::container_detail::version<Allocator>::value
318
- >
331
+ , class AllocatorVersion = typename container_detail::version<Allocator>::type
319
332
  >
320
333
  struct vector_alloc_holder
321
334
  : public Allocator
@@ -324,43 +337,69 @@ struct vector_alloc_holder
324
337
  BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
325
338
 
326
339
  public:
340
+ typedef Allocator allocator_type;
327
341
  typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
328
342
  typedef typename allocator_traits_type::pointer pointer;
329
343
  typedef typename allocator_traits_type::size_type size_type;
330
344
  typedef typename allocator_traits_type::value_type value_type;
331
345
 
346
+ static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
347
+ {
348
+ (void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
349
+ const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
350
+ !allocator_traits_type::storage_is_unpropagable(from_alloc, p);
351
+ return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
352
+ }
353
+
354
+ static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
355
+ {
356
+ (void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
357
+ const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
358
+ !(allocator_traits_type::storage_is_unpropagable(l_a, l_p) || allocator_traits_type::storage_is_unpropagable(r_a, r_p));
359
+ return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(l_a, r_a));
360
+ }
361
+
332
362
  //Constructor, does not throw
333
363
  vector_alloc_holder()
334
- BOOST_CONTAINER_NOEXCEPT_IF(::boost::has_nothrow_default_constructor<Allocator>::value)
364
+ BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
335
365
  : Allocator(), m_start(), m_size(), m_capacity()
336
366
  {}
337
367
 
338
368
  //Constructor, does not throw
339
369
  template<class AllocConvertible>
340
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_CONTAINER_NOEXCEPT
370
+ explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
341
371
  : Allocator(boost::forward<AllocConvertible>(a)), m_start(), m_size(), m_capacity()
342
372
  {}
343
373
 
344
374
  //Constructor, does not throw
345
375
  template<class AllocConvertible>
346
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
376
+ vector_alloc_holder(uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
347
377
  : Allocator(boost::forward<AllocConvertible>(a))
378
+ , m_start()
348
379
  , m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
380
+ , m_capacity()
349
381
  {
350
- m_start = this->allocation_command(allocate_new, initial_size, initial_size, m_capacity, m_start).first;
382
+ if(initial_size){
383
+ pointer reuse = 0;
384
+ m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
385
+ }
351
386
  }
352
387
 
353
388
  //Constructor, does not throw
354
- explicit vector_alloc_holder(size_type initial_size)
389
+ vector_alloc_holder(uninitialized_size_t, size_type initial_size)
355
390
  : Allocator()
391
+ , m_start()
356
392
  , m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
393
+ , m_capacity()
357
394
  {
358
- m_start = this->allocation_command
359
- (allocate_new, initial_size, initial_size, m_capacity, m_start).first;
395
+ if(initial_size){
396
+ pointer reuse = 0;
397
+ m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
398
+ }
360
399
  }
361
400
 
362
- vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_CONTAINER_NOEXCEPT
363
- : Allocator(boost::move(static_cast<Allocator&>(holder)))
401
+ vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
402
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
364
403
  , m_start(holder.m_start)
365
404
  , m_size(holder.m_size)
366
405
  , m_capacity(holder.m_capacity)
@@ -369,53 +408,100 @@ struct vector_alloc_holder
369
408
  holder.m_size = holder.m_capacity = 0;
370
409
  }
371
410
 
372
- void first_allocation(size_type cap)
411
+ vector_alloc_holder(pointer p, size_type capacity, BOOST_RV_REF(vector_alloc_holder) holder)
412
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
413
+ , m_start(p)
414
+ , m_size(holder.m_size)
415
+ , m_capacity(capacity)
373
416
  {
374
- m_start = this->allocation_command
375
- (allocate_new, cap, cap, m_capacity, m_start).first;
417
+ allocator_type &this_alloc = this->alloc();
418
+ allocator_type &x_alloc = holder.alloc();
419
+ if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){
420
+ if(this->m_capacity){
421
+ this->alloc().deallocate(this->m_start, this->m_capacity);
422
+ }
423
+ m_start = holder.m_start;
424
+ m_capacity = holder.m_capacity;
425
+ holder.m_start = pointer();
426
+ holder.m_capacity = holder.m_size = 0;
427
+ }
428
+ else if(this->m_capacity < holder.m_size){
429
+ size_type const n = holder.m_size;
430
+ pointer reuse = pointer();
431
+ m_start = this->allocation_command(allocate_new, n, m_capacity = n, reuse);
432
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
433
+ this->num_alloc += n != 0;
434
+ #endif
435
+ }
376
436
  }
377
437
 
378
- void first_allocation_same_allocator_type(size_type cap)
379
- { this->first_allocation(cap); }
438
+ vector_alloc_holder(pointer p, size_type n)
439
+ BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
440
+ : Allocator()
441
+ , m_start(p)
442
+ , m_size()
443
+ , m_capacity(n)
444
+ {}
445
+
446
+ template<class AllocFwd>
447
+ vector_alloc_holder(pointer p, size_type n, BOOST_FWD_REF(AllocFwd) a)
448
+ : Allocator(::boost::forward<AllocFwd>(a))
449
+ , m_start(p)
450
+ , m_size()
451
+ , m_capacity(n)
452
+ {}
380
453
 
381
- ~vector_alloc_holder() BOOST_CONTAINER_NOEXCEPT
454
+ ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
382
455
  {
383
456
  if(this->m_capacity){
384
457
  this->alloc().deallocate(this->m_start, this->m_capacity);
385
458
  }
386
459
  }
387
460
 
388
- std::pair<pointer, bool>
389
- allocation_command(allocation_type command,
390
- size_type limit_size,
391
- size_type preferred_size,
392
- size_type &received_size, const pointer &reuse = pointer())
461
+ pointer allocation_command(boost::container::allocation_type command,
462
+ size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
463
+ {
464
+ typedef typename container_detail::version<Allocator>::type alloc_version;
465
+ return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
466
+ }
467
+
468
+ bool try_expand_fwd(size_type at_least)
393
469
  {
394
- return allocator_version_traits<Allocator>::allocation_command
395
- (this->alloc(), command, limit_size, preferred_size, received_size, reuse);
470
+ //There is not enough memory, try to expand the old one
471
+ const size_type new_cap = this->capacity() + at_least;
472
+ size_type real_cap = new_cap;
473
+ pointer reuse = this->start();
474
+ bool const success = !!this->allocation_command(expand_fwd, new_cap, real_cap, reuse);
475
+ //Check for forward expansion
476
+ if(success){
477
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
478
+ ++this->num_expand_fwd;
479
+ #endif
480
+ this->capacity(real_cap);
481
+ }
482
+ return success;
396
483
  }
397
484
 
398
485
  size_type next_capacity(size_type additional_objects) const
399
486
  {
400
- std::size_t num_objects = this->m_size + additional_objects;
401
- std::size_t next_cap = this->m_capacity + this->m_capacity/2;
402
- return num_objects > next_cap ? num_objects : next_cap;/*
403
- return get_next_capacity( allocator_traits_type::max_size(this->m_holder.alloc())
404
- , this->m_capacity, additional_objects);*/
487
+ return next_capacity_calculator
488
+ <size_type, NextCapacityDouble //NextCapacity60Percent
489
+ >::get( allocator_traits_type::max_size(this->alloc())
490
+ , this->m_capacity, additional_objects );
405
491
  }
406
492
 
407
493
  pointer m_start;
408
494
  size_type m_size;
409
495
  size_type m_capacity;
410
496
 
411
- void swap(vector_alloc_holder &x) BOOST_CONTAINER_NOEXCEPT
497
+ void swap_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
412
498
  {
413
- boost::container::swap_dispatch(this->m_start, x.m_start);
414
- boost::container::swap_dispatch(this->m_size, x.m_size);
415
- boost::container::swap_dispatch(this->m_capacity, x.m_capacity);
499
+ boost::adl_move_swap(this->m_start, x.m_start);
500
+ boost::adl_move_swap(this->m_size, x.m_size);
501
+ boost::adl_move_swap(this->m_capacity, x.m_capacity);
416
502
  }
417
503
 
418
- void move_from_empty(vector_alloc_holder &x) BOOST_CONTAINER_NOEXCEPT
504
+ void steal_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
419
505
  {
420
506
  this->m_start = x.m_start;
421
507
  this->m_size = x.m_size;
@@ -424,21 +510,55 @@ struct vector_alloc_holder
424
510
  x.m_size = x.m_capacity = 0;
425
511
  }
426
512
 
427
- Allocator &alloc() BOOST_CONTAINER_NOEXCEPT
513
+ Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
428
514
  { return *this; }
429
515
 
430
- const Allocator &alloc() const BOOST_CONTAINER_NOEXCEPT
516
+ const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
431
517
  { return *this; }
432
518
 
433
- const pointer &start() const BOOST_CONTAINER_NOEXCEPT { return m_start; }
434
- const size_type &capacity() const BOOST_CONTAINER_NOEXCEPT { return m_capacity; }
435
- void start(const pointer &p) BOOST_CONTAINER_NOEXCEPT { m_start = p; }
436
- void capacity(const size_type &c) BOOST_CONTAINER_NOEXCEPT { m_capacity = c; }
519
+ const pointer &start() const BOOST_NOEXCEPT_OR_NOTHROW { return m_start; }
520
+ const size_type &capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return m_capacity; }
521
+ void start(const pointer &p) BOOST_NOEXCEPT_OR_NOTHROW { m_start = p; }
522
+ void capacity(const size_type &c) BOOST_NOEXCEPT_OR_NOTHROW { m_capacity = c; }
523
+
524
+ private:
525
+ void priv_first_allocation(size_type cap)
526
+ {
527
+ if(cap){
528
+ pointer reuse = 0;
529
+ m_start = this->allocation_command(allocate_new, cap, cap, reuse);
530
+ m_capacity = cap;
531
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
532
+ ++this->num_alloc;
533
+ #endif
534
+ }
535
+ }
536
+
537
+ pointer priv_allocation_command(version_1, boost::container::allocation_type command,
538
+ size_type ,
539
+ size_type &prefer_in_recvd_out_size,
540
+ pointer &reuse)
541
+ {
542
+ (void)command;
543
+ BOOST_ASSERT( (command & allocate_new));
544
+ BOOST_ASSERT(!(command & nothrow_allocation));
545
+ pointer const p = allocator_traits_type::allocate(this->alloc(), prefer_in_recvd_out_size, reuse);
546
+ reuse = pointer();
547
+ return p;
548
+ }
549
+
550
+ pointer priv_allocation_command(version_2, boost::container::allocation_type command,
551
+ size_type limit_size,
552
+ size_type &prefer_in_recvd_out_size,
553
+ pointer &reuse)
554
+ {
555
+ return this->alloc().allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
556
+ }
437
557
  };
438
558
 
439
559
  //!This struct deallocates and allocated memory
440
560
  template <class Allocator>
441
- struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsigned, 0> >
561
+ struct vector_alloc_holder<Allocator, version_0>
442
562
  : public Allocator
443
563
  {
444
564
  private:
@@ -455,35 +575,37 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
455
575
 
456
576
  //Constructor, does not throw
457
577
  vector_alloc_holder()
458
- BOOST_CONTAINER_NOEXCEPT_IF(::boost::has_nothrow_default_constructor<Allocator>::value)
578
+ BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
459
579
  : Allocator(), m_size()
460
580
  {}
461
581
 
462
582
  //Constructor, does not throw
463
583
  template<class AllocConvertible>
464
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_CONTAINER_NOEXCEPT
584
+ explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
465
585
  : Allocator(boost::forward<AllocConvertible>(a)), m_size()
466
586
  {}
467
587
 
468
588
  //Constructor, does not throw
469
589
  template<class AllocConvertible>
470
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
590
+ vector_alloc_holder(uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
471
591
  : Allocator(boost::forward<AllocConvertible>(a))
472
- , m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
592
+ , m_size(initial_size) //Size is initialized here...
473
593
  {
474
- this->first_allocation(initial_size);
594
+ //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
595
+ this->priv_first_allocation(initial_size);
475
596
  }
476
597
 
477
598
  //Constructor, does not throw
478
- explicit vector_alloc_holder(size_type initial_size)
599
+ vector_alloc_holder(uninitialized_size_t, size_type initial_size)
479
600
  : Allocator()
480
- , m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
601
+ , m_size(initial_size) //Size is initialized here...
481
602
  {
482
- this->first_allocation(initial_size);
603
+ //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
604
+ this->priv_first_allocation(initial_size);
483
605
  }
484
606
 
485
607
  vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder)
486
- : Allocator(boost::move(static_cast<Allocator&>(holder)))
608
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
487
609
  , m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this
488
610
  {
489
611
  ::boost::container::uninitialized_move_alloc_n
@@ -497,60 +619,62 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
497
619
  {
498
620
  //Different allocator type so we must check we have enough storage
499
621
  const size_type n = holder.m_size;
500
- this->first_allocation(n);
622
+ this->priv_first_allocation(n);
501
623
  ::boost::container::uninitialized_move_alloc_n
502
624
  (this->alloc(), container_detail::to_raw_pointer(holder.start()), n, container_detail::to_raw_pointer(this->start()));
503
625
  }
504
626
 
505
- void first_allocation(size_type cap)
627
+ void priv_first_allocation(size_type cap)
506
628
  {
507
629
  if(cap > Allocator::internal_capacity){
508
630
  throw_bad_alloc();
509
631
  }
510
632
  }
511
633
 
512
- void first_allocation_same_allocator_type(size_type) BOOST_CONTAINER_NOEXCEPT
513
- {}
514
-
515
- //Destructor
516
- ~vector_alloc_holder() BOOST_CONTAINER_NOEXCEPT
517
- {}
518
-
519
- void swap(vector_alloc_holder &x)
634
+ void deep_swap(vector_alloc_holder &x)
520
635
  {
521
- this->priv_swap_members_impl(x);
636
+ this->priv_deep_swap(x);
522
637
  }
523
638
 
524
639
  template<class OtherAllocator, class OtherAllocatorVersion>
525
- void swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
640
+ void deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
526
641
  {
527
642
  if(this->m_size > OtherAllocator::internal_capacity || x.m_size > Allocator::internal_capacity){
528
643
  throw_bad_alloc();
529
644
  }
530
- this->priv_swap_members_impl(x);
645
+ this->priv_deep_swap(x);
646
+ }
647
+
648
+ void swap_resources(vector_alloc_holder &) BOOST_NOEXCEPT_OR_NOTHROW
649
+ { //Containers with version 0 allocators can't be moved without moving elements one by one
650
+ throw_bad_alloc();
531
651
  }
532
652
 
533
- void move_from_empty(vector_alloc_holder &)
534
- { //Containers with version 0 allocators can't be moved without move elements one by one
653
+
654
+ void steal_resources(vector_alloc_holder &)
655
+ { //Containers with version 0 allocators can't be moved without moving elements one by one
535
656
  throw_bad_alloc();
536
657
  }
537
658
 
538
- Allocator &alloc() BOOST_CONTAINER_NOEXCEPT
659
+ Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
539
660
  { return *this; }
540
661
 
541
- const Allocator &alloc() const BOOST_CONTAINER_NOEXCEPT
662
+ const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
542
663
  { return *this; }
543
664
 
544
- pointer start() const BOOST_CONTAINER_NOEXCEPT { return Allocator::internal_storage(); }
545
- size_type capacity() const BOOST_CONTAINER_NOEXCEPT { return Allocator::internal_capacity; }
665
+ bool try_expand_fwd(size_type at_least)
666
+ { return !at_least; }
667
+
668
+ pointer start() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_storage(); }
669
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_capacity; }
546
670
  size_type m_size;
547
671
 
548
672
  private:
549
673
 
550
674
  template<class OtherAllocator, class OtherAllocatorVersion>
551
- void priv_swap_members_impl(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
675
+ void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
552
676
  {
553
- const std::size_t MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
677
+ const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
554
678
  value_type *const first_this = container_detail::to_raw_pointer(this->start());
555
679
  value_type *const first_x = container_detail::to_raw_pointer(x.start());
556
680
 
@@ -560,37 +684,53 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
560
684
  else{
561
685
  boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_x, x.m_size, first_this, this->m_size);
562
686
  }
563
- boost::container::swap_dispatch(this->m_size, x.m_size);
687
+ boost::adl_move_swap(this->m_size, x.m_size);
564
688
  }
565
689
  };
566
690
 
567
691
  } //namespace container_detail {
568
- /// @endcond
569
692
 
570
- //! \class vector
693
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
694
+
571
695
  //! A vector is a sequence that supports random access to elements, constant
572
696
  //! time insertion and removal of elements at the end, and linear time insertion
573
697
  //! and removal of elements at the beginning or in the middle. The number of
574
698
  //! elements in a vector may vary dynamically; memory management is automatic.
575
- //! boost::container::vector is similar to std::vector but it's compatible
576
- //! with shared memory and memory mapped files.
577
- #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
578
- template <class T, class Allocator = std::allocator<T> >
579
- #else
580
- template <class T, class Allocator>
581
- #endif
699
+ //!
700
+ //! \tparam T The type of object that is stored in the vector
701
+ //! \tparam Allocator The allocator used for all internal memory management
702
+ template <class T, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>) >
582
703
  class vector
583
704
  {
584
- /// @cond
585
- typedef container_detail::integral_constant
586
- <unsigned, boost::container::container_detail::version
587
- <Allocator>::value > alloc_version;
588
- boost::container::container_detail::vector_alloc_holder<Allocator, alloc_version> m_holder;
589
- typedef container_detail::vector_alloc_holder<Allocator> base_t;
590
- typedef allocator_traits<Allocator> allocator_traits_type;
705
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
706
+
707
+ struct value_less
708
+ {
709
+ typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
710
+ bool operator()(const value_type &a, const value_type &b) const
711
+ { return a < b; }
712
+ };
713
+
714
+ typedef typename container_detail::version<Allocator>::type alloc_version;
715
+ typedef boost::container::container_detail::vector_alloc_holder<Allocator> alloc_holder_t;
716
+ alloc_holder_t m_holder;
717
+ typedef allocator_traits<Allocator> allocator_traits_type;
591
718
  template <class U, class UAllocator>
592
719
  friend class vector;
593
- /// @endcond
720
+
721
+ typedef typename allocator_traits_type::pointer pointer_impl;
722
+ typedef container_detail::vec_iterator<pointer_impl, false> iterator_impl;
723
+ typedef container_detail::vec_iterator<pointer_impl, true > const_iterator_impl;
724
+
725
+ protected:
726
+ static bool is_propagable_from(const Allocator &from_alloc, pointer_impl p, const Allocator &to_alloc, bool const propagate_allocator)
727
+ { return alloc_holder_t::is_propagable_from(from_alloc, p, to_alloc, propagate_allocator); }
728
+
729
+ static bool are_swap_propagable( const Allocator &l_a, pointer_impl l_p
730
+ , const Allocator &r_a, pointer_impl r_p, bool const propagate_allocator)
731
+ { return alloc_holder_t::are_swap_propagable(l_a, l_p, r_a, r_p, propagate_allocator); }
732
+
733
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
594
734
  public:
595
735
  //////////////////////////////////////////////
596
736
  //
@@ -607,27 +747,38 @@ class vector
607
747
  typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
608
748
  typedef Allocator allocator_type;
609
749
  typedef Allocator stored_allocator_type;
610
- #if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER && !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
750
+ #if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
611
751
  typedef BOOST_CONTAINER_IMPDEF(pointer) iterator;
612
752
  typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
613
753
  #else
614
- typedef BOOST_CONTAINER_IMPDEF(container_detail::vector_iterator<pointer>) iterator;
615
- typedef BOOST_CONTAINER_IMPDEF(container_detail::vector_const_iterator<pointer>) const_iterator;
754
+ typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
755
+ typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
616
756
  #endif
617
- typedef BOOST_CONTAINER_IMPDEF(std::reverse_iterator<iterator>) reverse_iterator;
618
- typedef BOOST_CONTAINER_IMPDEF(std::reverse_iterator<const_iterator>) const_reverse_iterator;
757
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
758
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
619
759
 
620
- /// @cond
760
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
621
761
  private:
622
762
  BOOST_COPYABLE_AND_MOVABLE(vector)
623
- typedef container_detail::vector_value_traits<value_type, Allocator> value_traits;
763
+ typedef container_detail::vector_value_traits<Allocator> value_traits;
764
+ typedef constant_iterator<T, difference_type> cvalue_iterator;
624
765
 
625
- typedef container_detail::integral_constant<unsigned, 0> allocator_v0;
626
- typedef container_detail::integral_constant<unsigned, 1> allocator_v1;
627
- typedef container_detail::integral_constant<unsigned, 2> allocator_v2;
766
+ protected:
628
767
 
629
- typedef constant_iterator<T, difference_type> cvalue_iterator;
630
- /// @endcond
768
+ void steal_resources(vector &x)
769
+ { return this->m_holder.steal_resources(x.m_holder); }
770
+
771
+ struct initial_capacity_t{};
772
+ template<class AllocFwd>
773
+ vector(initial_capacity_t, pointer initial_memory, size_type capacity, BOOST_FWD_REF(AllocFwd) a)
774
+ : m_holder(initial_memory, capacity, ::boost::forward<AllocFwd>(a))
775
+ {}
776
+
777
+ vector(initial_capacity_t, pointer initial_memory, size_type capacity)
778
+ : m_holder(initial_memory, capacity)
779
+ {}
780
+
781
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
631
782
 
632
783
  public:
633
784
  //////////////////////////////////////////////
@@ -638,11 +789,10 @@ class vector
638
789
 
639
790
  //! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
640
791
  //!
641
- //! <b>Throws</b>: If allocator_type's default constructor throws.
792
+ //! <b>Throws</b>: Nothing.
642
793
  //!
643
794
  //! <b>Complexity</b>: Constant.
644
- vector()
645
- BOOST_CONTAINER_NOEXCEPT_IF(::boost::has_nothrow_default_constructor<Allocator>::value)
795
+ vector() BOOST_NOEXCEPT_OR_NOTHROW
646
796
  : m_holder()
647
797
  {}
648
798
 
@@ -651,35 +801,96 @@ class vector
651
801
  //! <b>Throws</b>: Nothing
652
802
  //!
653
803
  //! <b>Complexity</b>: Constant.
654
- explicit vector(const Allocator& a) BOOST_CONTAINER_NOEXCEPT
804
+ explicit vector(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
655
805
  : m_holder(a)
656
806
  {}
657
807
 
658
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
659
- //! and inserts n default contructed values.
808
+ //! <b>Effects</b>: Constructs a vector and inserts n value initialized values.
660
809
  //!
661
- //! <b>Throws</b>: If allocator_type's default constructor or allocation
662
- //! throws or T's default constructor throws.
810
+ //! <b>Throws</b>: If allocator_type's allocation
811
+ //! throws or T's value initialization throws.
663
812
  //!
664
813
  //! <b>Complexity</b>: Linear to n.
665
814
  explicit vector(size_type n)
666
- : m_holder(n)
815
+ : m_holder(container_detail::uninitialized_size, n)
816
+ {
817
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
818
+ this->num_alloc += n != 0;
819
+ #endif
820
+ boost::container::uninitialized_value_init_alloc_n
821
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
822
+ }
823
+
824
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
825
+ //! and inserts n default initialized values.
826
+ //!
827
+ //! <b>Throws</b>: If allocator_type's allocation
828
+ //! throws or T's default initialization throws.
829
+ //!
830
+ //! <b>Complexity</b>: Linear to n.
831
+ //!
832
+ //! <b>Note</b>: Non-standard extension
833
+ vector(size_type n, default_init_t)
834
+ : m_holder(container_detail::uninitialized_size, n)
667
835
  {
668
- boost::container::uninitialized_default_alloc_n(this->m_holder.alloc(), n, container_detail::to_raw_pointer(this->m_holder.start()));
836
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
837
+ this->num_alloc += n != 0;
838
+ #endif
839
+ boost::container::uninitialized_default_init_alloc_n
840
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
841
+ }
842
+
843
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
844
+ //! and inserts n value initialized values.
845
+ //!
846
+ //! <b>Throws</b>: If allocator_type's allocation
847
+ //! throws or T's value initialization throws.
848
+ //!
849
+ //! <b>Complexity</b>: Linear to n.
850
+ explicit vector(size_type n, const allocator_type &a)
851
+ : m_holder(container_detail::uninitialized_size, a, n)
852
+ {
853
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
854
+ this->num_alloc += n != 0;
855
+ #endif
856
+ boost::container::uninitialized_value_init_alloc_n
857
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
858
+ }
859
+
860
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
861
+ //! and inserts n default initialized values.
862
+ //!
863
+ //! <b>Throws</b>: If allocator_type's allocation
864
+ //! throws or T's default initialization throws.
865
+ //!
866
+ //! <b>Complexity</b>: Linear to n.
867
+ //!
868
+ //! <b>Note</b>: Non-standard extension
869
+ vector(size_type n, default_init_t, const allocator_type &a)
870
+ : m_holder(container_detail::uninitialized_size, a, n)
871
+ {
872
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
873
+ this->num_alloc += n != 0;
874
+ #endif
875
+ boost::container::uninitialized_default_init_alloc_n
876
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
669
877
  }
670
878
 
671
879
  //! <b>Effects</b>: Constructs a vector
672
880
  //! and inserts n copies of value.
673
881
  //!
674
- //! <b>Throws</b>: If allocator_type's default constructor or allocation
882
+ //! <b>Throws</b>: If allocator_type's allocation
675
883
  //! throws or T's copy constructor throws.
676
884
  //!
677
885
  //! <b>Complexity</b>: Linear to n.
678
886
  vector(size_type n, const T& value)
679
- : m_holder(n)
887
+ : m_holder(container_detail::uninitialized_size, n)
680
888
  {
889
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
890
+ this->num_alloc += n != 0;
891
+ #endif
681
892
  boost::container::uninitialized_fill_alloc_n
682
- (this->m_holder.alloc(), value, n, container_detail::to_raw_pointer(this->m_holder.start()));
893
+ (this->m_holder.alloc(), value, n, this->priv_raw_begin());
683
894
  }
684
895
 
685
896
  //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
@@ -690,73 +901,98 @@ class vector
690
901
  //!
691
902
  //! <b>Complexity</b>: Linear to n.
692
903
  vector(size_type n, const T& value, const allocator_type& a)
693
- : m_holder(a, n)
904
+ : m_holder(container_detail::uninitialized_size, a, n)
694
905
  {
906
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
907
+ this->num_alloc += n != 0;
908
+ #endif
695
909
  boost::container::uninitialized_fill_alloc_n
696
- (this->m_holder.alloc(), value, n, container_detail::to_raw_pointer(this->m_holder.start()));
910
+ (this->m_holder.alloc(), value, n, this->priv_raw_begin());
697
911
  }
698
912
 
699
913
  //! <b>Effects</b>: Constructs a vector
700
914
  //! and inserts a copy of the range [first, last) in the vector.
701
915
  //!
702
- //! <b>Throws</b>: If allocator_type's default constructor or allocation
703
- //! throws or T's constructor taking an dereferenced InIt throws.
916
+ //! <b>Throws</b>: If allocator_type's allocation
917
+ //! throws or T's constructor taking a dereferenced InIt throws.
704
918
  //!
705
919
  //! <b>Complexity</b>: Linear to the range [first, last).
706
920
  template <class InIt>
707
921
  vector(InIt first, InIt last)
708
922
  : m_holder()
709
- { this->insert(this->cend(), first, last); }
923
+ { this->assign(first, last); }
710
924
 
711
925
  //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
712
926
  //! and inserts a copy of the range [first, last) in the vector.
713
927
  //!
714
- //! <b>Throws</b>: If allocator_type's default constructor or allocation
715
- //! throws or T's constructor taking an dereferenced InIt throws.
928
+ //! <b>Throws</b>: If allocator_type's allocation
929
+ //! throws or T's constructor taking a dereferenced InIt throws.
716
930
  //!
717
931
  //! <b>Complexity</b>: Linear to the range [first, last).
718
932
  template <class InIt>
719
933
  vector(InIt first, InIt last, const allocator_type& a)
720
934
  : m_holder(a)
721
- { this->insert(this->cend(), first, last); }
935
+ { this->assign(first, last); }
722
936
 
723
937
  //! <b>Effects</b>: Copy constructs a vector.
724
938
  //!
725
939
  //! <b>Postcondition</b>: x == *this.
726
940
  //!
727
- //! <b>Throws</b>: If allocator_type's default constructor or allocation
941
+ //! <b>Throws</b>: If allocator_type's allocation
728
942
  //! throws or T's copy constructor throws.
729
943
  //!
730
944
  //! <b>Complexity</b>: Linear to the elements x contains.
731
945
  vector(const vector &x)
732
- : m_holder(allocator_traits_type::select_on_container_copy_construction(x.m_holder.alloc()), x.size())
946
+ : m_holder( container_detail::uninitialized_size
947
+ , allocator_traits_type::select_on_container_copy_construction(x.m_holder.alloc())
948
+ , x.size())
733
949
  {
950
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
951
+ this->num_alloc += x.size() != 0;
952
+ #endif
734
953
  ::boost::container::uninitialized_copy_alloc_n
735
- ( this->m_holder.alloc(), container_detail::to_raw_pointer(x.m_holder.start())
736
- , x.size(), container_detail::to_raw_pointer(this->m_holder.start()));
954
+ ( this->m_holder.alloc(), x.priv_raw_begin()
955
+ , x.size(), this->priv_raw_begin());
737
956
  }
738
957
 
739
- //! <b>Effects</b>: Move constructor. Moves mx's resources to *this.
958
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
740
959
  //!
741
960
  //! <b>Throws</b>: Nothing
742
961
  //!
743
962
  //! <b>Complexity</b>: Constant.
744
- vector(BOOST_RV_REF(vector) mx) BOOST_CONTAINER_NOEXCEPT
745
- : m_holder(boost::move(mx.m_holder))
746
- {}
963
+ vector(BOOST_RV_REF(vector) x) BOOST_NOEXCEPT_OR_NOTHROW
964
+ : m_holder(boost::move(x.m_holder))
965
+ { BOOST_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); }
966
+
967
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
968
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
969
+ //! and inserts a copy of the range [il.begin(), il.last()) in the vector
970
+ //!
971
+ //! <b>Throws</b>: If T's constructor taking a dereferenced initializer_list iterator throws.
972
+ //!
973
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
974
+ vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
975
+ : m_holder(a)
976
+ {
977
+ this->assign(il.begin(), il.end());
978
+ }
979
+ #endif
747
980
 
748
981
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
749
982
 
750
- //! <b>Effects</b>: Move constructor. Moves mx's resources to *this.
983
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
751
984
  //!
752
985
  //! <b>Throws</b>: If T's move constructor or allocation throws
753
986
  //!
754
987
  //! <b>Complexity</b>: Linear.
755
988
  //!
756
- //! <b>Note</b>: Non-standard extension
989
+ //! <b>Note</b>: Non-standard extension to support static_vector
757
990
  template<class OtherAllocator>
758
- vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END mx)
759
- : m_holder(boost::move(mx.m_holder))
991
+ vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
992
+ , typename container_detail::enable_if_c
993
+ < container_detail::is_version<OtherAllocator, 0>::value>::type * = 0
994
+ )
995
+ : m_holder(boost::move(x.m_holder))
760
996
  {}
761
997
 
762
998
  #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@@ -770,33 +1006,39 @@ class vector
770
1006
  //!
771
1007
  //! <b>Complexity</b>: Linear to the elements x contains.
772
1008
  vector(const vector &x, const allocator_type &a)
773
- : m_holder(a, x.size())
1009
+ : m_holder(container_detail::uninitialized_size, a, x.size())
774
1010
  {
1011
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1012
+ this->num_alloc += x.size() != 0;
1013
+ #endif
775
1014
  ::boost::container::uninitialized_copy_alloc_n_source
776
- ( this->m_holder.alloc(), container_detail::to_raw_pointer(x.m_holder.start())
777
- , x.size(), container_detail::to_raw_pointer(this->m_holder.start()));
1015
+ ( this->m_holder.alloc(), x.priv_raw_begin()
1016
+ , x.size(), this->priv_raw_begin());
778
1017
  }
779
1018
 
780
1019
  //! <b>Effects</b>: Move constructor using the specified allocator.
781
- //! Moves mx's resources to *this if a == allocator_type().
1020
+ //! Moves x's resources to *this if a == allocator_type().
782
1021
  //! Otherwise copies values from x to *this.
783
1022
  //!
784
1023
  //! <b>Throws</b>: If allocation or T's copy constructor throws.
785
1024
  //!
786
- //! <b>Complexity</b>: Constant if a == mx.get_allocator(), linear otherwise.
787
- vector(BOOST_RV_REF(vector) mx, const allocator_type &a)
788
- : m_holder(a)
1025
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
1026
+ vector(BOOST_RV_REF(vector) x, const allocator_type &a)
1027
+ : m_holder( container_detail::uninitialized_size, a
1028
+ , is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true) ? 0 : x.size()
1029
+ )
789
1030
  {
790
- if(mx.m_holder.alloc() == a){
791
- this->m_holder.move_from_empty(mx.m_holder);
1031
+ if(is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true)){
1032
+ this->m_holder.steal_resources(x.m_holder);
792
1033
  }
793
1034
  else{
794
- const size_type n = mx.size();
795
- this->m_holder.first_allocation_same_allocator_type(n);
1035
+ const size_type n = x.size();
1036
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1037
+ this->num_alloc += n != 0;
1038
+ #endif
796
1039
  ::boost::container::uninitialized_move_alloc_n_source
797
- ( this->m_holder.alloc(), container_detail::to_raw_pointer(mx.m_holder.start())
798
- , n, container_detail::to_raw_pointer(this->m_holder.start()));
799
- this->m_holder.m_size = n;
1040
+ ( this->m_holder.alloc(), x.priv_raw_begin()
1041
+ , n, this->priv_raw_begin());
800
1042
  }
801
1043
  }
802
1044
 
@@ -806,12 +1048,12 @@ class vector
806
1048
  //! <b>Throws</b>: Nothing.
807
1049
  //!
808
1050
  //! <b>Complexity</b>: Linear to the number of elements.
809
- ~vector() BOOST_CONTAINER_NOEXCEPT
1051
+ ~vector() BOOST_NOEXCEPT_OR_NOTHROW
810
1052
  {
811
1053
  boost::container::destroy_alloc_n
812
- (this->get_stored_allocator(), container_detail::to_raw_pointer(this->m_holder.start()), this->m_holder.m_size);
1054
+ (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
813
1055
  //vector_alloc_holder deallocates the data
814
- }
1056
+ }
815
1057
 
816
1058
  //! <b>Effects</b>: Makes *this contain the same elements as x.
817
1059
  //!
@@ -824,30 +1066,45 @@ class vector
824
1066
  vector& operator=(BOOST_COPY_ASSIGN_REF(vector) x)
825
1067
  {
826
1068
  if (&x != this){
827
- this->priv_copy_assign(boost::move(x), alloc_version());
1069
+ this->priv_copy_assign(x);
828
1070
  }
829
1071
  return *this;
830
1072
  }
831
1073
 
832
- //! <b>Effects</b>: Move assignment. All mx's values are transferred to *this.
1074
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1075
+ //! <b>Effects</b>: Make *this container contains elements from il.
1076
+ //!
1077
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
1078
+ vector& operator=(std::initializer_list<value_type> il)
1079
+ {
1080
+ this->assign(il.begin(), il.end());
1081
+ return *this;
1082
+ }
1083
+ #endif
1084
+
1085
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
833
1086
  //!
834
1087
  //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
835
1088
  //! before the function.
836
1089
  //!
837
- //! <b>Throws</b>: Nothing
1090
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
1091
+ //! is false and (allocation throws or value_type's move constructor throws)
838
1092
  //!
839
- //! <b>Complexity</b>: Linear.
1093
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
1094
+ //! propagate_on_container_move_assignment is true or
1095
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
840
1096
  vector& operator=(BOOST_RV_REF(vector) x)
841
- //iG BOOST_CONTAINER_NOEXCEPT_IF(!allocator_type::propagate_on_container_move_assignment::value || is_nothrow_move_assignable<allocator_type>::value);)
842
- BOOST_CONTAINER_NOEXCEPT
1097
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
1098
+ || allocator_traits_type::is_always_equal::value)
843
1099
  {
844
- this->priv_move_assign(boost::move(x), alloc_version());
1100
+ BOOST_ASSERT(&x != this);
1101
+ this->priv_move_assign(boost::move(x));
845
1102
  return *this;
846
1103
  }
847
1104
 
848
1105
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
849
1106
 
850
- //! <b>Effects</b>: Move assignment. All mx's values are transferred to *this.
1107
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
851
1108
  //!
852
1109
  //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
853
1110
  //! before the function.
@@ -855,10 +1112,39 @@ class vector
855
1112
  //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
856
1113
  //!
857
1114
  //! <b>Complexity</b>: Linear.
858
- template<class OtherAllocator, class OtherAllocatorVersion>
859
- vector& operator=(BOOST_RV_REF_BEG vector<OtherAllocator, OtherAllocatorVersion> BOOST_RV_REF_END x)
860
- {
861
- this->priv_move_assign(boost::move(x), alloc_version());
1115
+ //!
1116
+ //! <b>Note</b>: Non-standard extension to support static_vector
1117
+ template<class OtherAllocator>
1118
+ typename container_detail::enable_if_and
1119
+ < vector&
1120
+ , container_detail::is_version<OtherAllocator, 0>
1121
+ , container_detail::is_different<OtherAllocator, allocator_type>
1122
+ >::type
1123
+ operator=(BOOST_RV_REF_BEG vector<value_type, OtherAllocator> BOOST_RV_REF_END x)
1124
+ {
1125
+ this->priv_move_assign(boost::move(x));
1126
+ return *this;
1127
+ }
1128
+
1129
+ //! <b>Effects</b>: Copy assignment. All x's values are copied to *this.
1130
+ //!
1131
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
1132
+ //! before the function.
1133
+ //!
1134
+ //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
1135
+ //!
1136
+ //! <b>Complexity</b>: Linear.
1137
+ //!
1138
+ //! <b>Note</b>: Non-standard extension to support static_vector
1139
+ template<class OtherAllocator>
1140
+ typename container_detail::enable_if_and
1141
+ < vector&
1142
+ , container_detail::is_version<OtherAllocator, 0>
1143
+ , container_detail::is_different<OtherAllocator, allocator_type>
1144
+ >::type
1145
+ operator=(const vector<value_type, OtherAllocator> &x)
1146
+ {
1147
+ this->priv_copy_assign(x);
862
1148
  return *this;
863
1149
  }
864
1150
 
@@ -872,12 +1158,14 @@ class vector
872
1158
  //! <b>Complexity</b>: Linear to n.
873
1159
  template <class InIt>
874
1160
  void assign(InIt first, InIt last
875
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
876
- , typename container_detail::enable_if_c
877
- < !container_detail::is_convertible<InIt, size_type>::value
878
- //&& container_detail::is_input_iterator<InIt>::value
879
- >::type * = 0
880
- #endif
1161
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_or
1162
+ < void
1163
+ BOOST_MOVE_I container_detail::is_convertible<InIt BOOST_MOVE_I size_type>
1164
+ BOOST_MOVE_I container_detail::and_
1165
+ < container_detail::is_different<alloc_version BOOST_MOVE_I version_0>
1166
+ BOOST_MOVE_I container_detail::is_not_input_iterator<InIt>
1167
+ >
1168
+ >::type * = 0)
881
1169
  )
882
1170
  {
883
1171
  //Overwrite all elements we can from [first, last)
@@ -889,8 +1177,8 @@ class vector
889
1177
 
890
1178
  if (first == last){
891
1179
  //There are no more elements in the sequence, erase remaining
892
- T* const end_pos = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
893
- size_type n = static_cast<size_type>(end_pos - container_detail::to_raw_pointer(vector_iterator_get_ptr(cur)));
1180
+ T* const end_pos = this->priv_raw_end();
1181
+ const size_type n = static_cast<size_type>(end_pos - container_detail::iterator_to_raw_pointer(cur));
894
1182
  this->priv_destroy_last_n(n);
895
1183
  }
896
1184
  else{
@@ -899,6 +1187,82 @@ class vector
899
1187
  }
900
1188
  }
901
1189
 
1190
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1191
+ //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
1192
+ //!
1193
+ //! <b>Throws</b>: If memory allocation throws or
1194
+ //! T's constructor from dereferencing iniializer_list iterator throws.
1195
+ //!
1196
+ void assign(std::initializer_list<T> il)
1197
+ {
1198
+ this->assign(il.begin(), il.end());
1199
+ }
1200
+ #endif
1201
+
1202
+ //! <b>Effects</b>: Assigns the the range [first, last) to *this.
1203
+ //!
1204
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
1205
+ //! T's constructor/assignment from dereferencing InpIt throws.
1206
+ //!
1207
+ //! <b>Complexity</b>: Linear to n.
1208
+ template <class FwdIt>
1209
+ void assign(FwdIt first, FwdIt last
1210
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_or
1211
+ < void
1212
+ BOOST_MOVE_I container_detail::is_same<alloc_version BOOST_MOVE_I version_0>
1213
+ BOOST_MOVE_I container_detail::is_convertible<FwdIt BOOST_MOVE_I size_type>
1214
+ BOOST_MOVE_I container_detail::is_input_iterator<FwdIt>
1215
+ >::type * = 0)
1216
+ )
1217
+ {
1218
+ //For Fwd iterators the standard only requires EmplaceConstructible and assignable from *first
1219
+ //so we can't do any backwards allocation
1220
+ const size_type input_sz = static_cast<size_type>(boost::container::iterator_distance(first, last));
1221
+ const size_type old_capacity = this->capacity();
1222
+ if(input_sz > old_capacity){ //If input range is too big, we need to reallocate
1223
+ size_type real_cap = 0;
1224
+ pointer reuse(this->m_holder.start());
1225
+ pointer const ret(this->m_holder.allocation_command(allocate_new|expand_fwd, input_sz, real_cap = input_sz, reuse));
1226
+ if(!reuse){ //New allocation, just emplace new values
1227
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1228
+ ++this->num_alloc;
1229
+ #endif
1230
+ pointer const old_p = this->m_holder.start();
1231
+ if(old_p){
1232
+ this->priv_destroy_all();
1233
+ this->m_holder.alloc().deallocate(old_p, old_capacity);
1234
+ }
1235
+ this->m_holder.start(ret);
1236
+ this->m_holder.capacity(real_cap);
1237
+ this->m_holder.m_size = 0;
1238
+ this->priv_uninitialized_construct_at_end(first, last);
1239
+ return;
1240
+ }
1241
+ else{
1242
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1243
+ ++this->num_expand_fwd;
1244
+ #endif
1245
+ this->m_holder.capacity(real_cap);
1246
+ //Forward expansion, use assignment + back deletion/construction that comes later
1247
+ }
1248
+ }
1249
+ //Overwrite all elements we can from [first, last)
1250
+ iterator cur = this->begin();
1251
+ const iterator end_it = this->end();
1252
+ for ( ; first != last && cur != end_it; ++cur, ++first){
1253
+ *cur = *first;
1254
+ }
1255
+
1256
+ if (first == last){
1257
+ //There are no more elements in the sequence, erase remaining
1258
+ this->priv_destroy_last_n(this->size() - input_sz);
1259
+ }
1260
+ else{
1261
+ //Uninitialized construct at end the remaining range
1262
+ this->priv_uninitialized_construct_at_end(first, last);
1263
+ }
1264
+ }
1265
+
902
1266
  //! <b>Effects</b>: Assigns the n copies of val to *this.
903
1267
  //!
904
1268
  //! <b>Throws</b>: If memory allocation throws or
@@ -913,7 +1277,7 @@ class vector
913
1277
  //! <b>Throws</b>: If allocator's copy constructor throws.
914
1278
  //!
915
1279
  //! <b>Complexity</b>: Constant.
916
- allocator_type get_allocator() const BOOST_CONTAINER_NOEXCEPT
1280
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
917
1281
  { return this->m_holder.alloc(); }
918
1282
 
919
1283
  //! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -923,7 +1287,7 @@ class vector
923
1287
  //! <b>Complexity</b>: Constant.
924
1288
  //!
925
1289
  //! <b>Note</b>: Non-standard extension.
926
- stored_allocator_type &get_stored_allocator() BOOST_CONTAINER_NOEXCEPT
1290
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
927
1291
  { return this->m_holder.alloc(); }
928
1292
 
929
1293
  //! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -933,7 +1297,7 @@ class vector
933
1297
  //! <b>Complexity</b>: Constant.
934
1298
  //!
935
1299
  //! <b>Note</b>: Non-standard extension.
936
- const stored_allocator_type &get_stored_allocator() const BOOST_CONTAINER_NOEXCEPT
1300
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
937
1301
  { return this->m_holder.alloc(); }
938
1302
 
939
1303
  //////////////////////////////////////////////
@@ -947,7 +1311,7 @@ class vector
947
1311
  //! <b>Throws</b>: Nothing.
948
1312
  //!
949
1313
  //! <b>Complexity</b>: Constant.
950
- iterator begin() BOOST_CONTAINER_NOEXCEPT
1314
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
951
1315
  { return iterator(this->m_holder.start()); }
952
1316
 
953
1317
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
@@ -955,7 +1319,7 @@ class vector
955
1319
  //! <b>Throws</b>: Nothing.
956
1320
  //!
957
1321
  //! <b>Complexity</b>: Constant.
958
- const_iterator begin() const BOOST_CONTAINER_NOEXCEPT
1322
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
959
1323
  { return const_iterator(this->m_holder.start()); }
960
1324
 
961
1325
  //! <b>Effects</b>: Returns an iterator to the end of the vector.
@@ -963,7 +1327,7 @@ class vector
963
1327
  //! <b>Throws</b>: Nothing.
964
1328
  //!
965
1329
  //! <b>Complexity</b>: Constant.
966
- iterator end() BOOST_CONTAINER_NOEXCEPT
1330
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
967
1331
  { return iterator(this->m_holder.start() + this->m_holder.m_size); }
968
1332
 
969
1333
  //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
@@ -971,7 +1335,7 @@ class vector
971
1335
  //! <b>Throws</b>: Nothing.
972
1336
  //!
973
1337
  //! <b>Complexity</b>: Constant.
974
- const_iterator end() const BOOST_CONTAINER_NOEXCEPT
1338
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
975
1339
  { return this->cend(); }
976
1340
 
977
1341
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
@@ -980,7 +1344,7 @@ class vector
980
1344
  //! <b>Throws</b>: Nothing.
981
1345
  //!
982
1346
  //! <b>Complexity</b>: Constant.
983
- reverse_iterator rbegin() BOOST_CONTAINER_NOEXCEPT
1347
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
984
1348
  { return reverse_iterator(this->end()); }
985
1349
 
986
1350
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -989,7 +1353,7 @@ class vector
989
1353
  //! <b>Throws</b>: Nothing.
990
1354
  //!
991
1355
  //! <b>Complexity</b>: Constant.
992
- const_reverse_iterator rbegin() const BOOST_CONTAINER_NOEXCEPT
1356
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
993
1357
  { return this->crbegin(); }
994
1358
 
995
1359
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
@@ -998,7 +1362,7 @@ class vector
998
1362
  //! <b>Throws</b>: Nothing.
999
1363
  //!
1000
1364
  //! <b>Complexity</b>: Constant.
1001
- reverse_iterator rend() BOOST_CONTAINER_NOEXCEPT
1365
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
1002
1366
  { return reverse_iterator(this->begin()); }
1003
1367
 
1004
1368
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -1007,7 +1371,7 @@ class vector
1007
1371
  //! <b>Throws</b>: Nothing.
1008
1372
  //!
1009
1373
  //! <b>Complexity</b>: Constant.
1010
- const_reverse_iterator rend() const BOOST_CONTAINER_NOEXCEPT
1374
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
1011
1375
  { return this->crend(); }
1012
1376
 
1013
1377
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
@@ -1015,7 +1379,7 @@ class vector
1015
1379
  //! <b>Throws</b>: Nothing.
1016
1380
  //!
1017
1381
  //! <b>Complexity</b>: Constant.
1018
- const_iterator cbegin() const BOOST_CONTAINER_NOEXCEPT
1382
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
1019
1383
  { return const_iterator(this->m_holder.start()); }
1020
1384
 
1021
1385
  //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
@@ -1023,7 +1387,7 @@ class vector
1023
1387
  //! <b>Throws</b>: Nothing.
1024
1388
  //!
1025
1389
  //! <b>Complexity</b>: Constant.
1026
- const_iterator cend() const BOOST_CONTAINER_NOEXCEPT
1390
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
1027
1391
  { return const_iterator(this->m_holder.start() + this->m_holder.m_size); }
1028
1392
 
1029
1393
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -1032,7 +1396,7 @@ class vector
1032
1396
  //! <b>Throws</b>: Nothing.
1033
1397
  //!
1034
1398
  //! <b>Complexity</b>: Constant.
1035
- const_reverse_iterator crbegin() const BOOST_CONTAINER_NOEXCEPT
1399
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
1036
1400
  { return const_reverse_iterator(this->end());}
1037
1401
 
1038
1402
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -1041,7 +1405,7 @@ class vector
1041
1405
  //! <b>Throws</b>: Nothing.
1042
1406
  //!
1043
1407
  //! <b>Complexity</b>: Constant.
1044
- const_reverse_iterator crend() const BOOST_CONTAINER_NOEXCEPT
1408
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
1045
1409
  { return const_reverse_iterator(this->begin()); }
1046
1410
 
1047
1411
  //////////////////////////////////////////////
@@ -1055,7 +1419,7 @@ class vector
1055
1419
  //! <b>Throws</b>: Nothing.
1056
1420
  //!
1057
1421
  //! <b>Complexity</b>: Constant.
1058
- bool empty() const BOOST_CONTAINER_NOEXCEPT
1422
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
1059
1423
  { return !this->m_holder.m_size; }
1060
1424
 
1061
1425
  //! <b>Effects</b>: Returns the number of the elements contained in the vector.
@@ -1063,7 +1427,7 @@ class vector
1063
1427
  //! <b>Throws</b>: Nothing.
1064
1428
  //!
1065
1429
  //! <b>Complexity</b>: Constant.
1066
- size_type size() const BOOST_CONTAINER_NOEXCEPT
1430
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
1067
1431
  { return this->m_holder.m_size; }
1068
1432
 
1069
1433
  //! <b>Effects</b>: Returns the largest possible size of the vector.
@@ -1071,48 +1435,37 @@ class vector
1071
1435
  //! <b>Throws</b>: Nothing.
1072
1436
  //!
1073
1437
  //! <b>Complexity</b>: Constant.
1074
- size_type max_size() const BOOST_CONTAINER_NOEXCEPT
1438
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
1075
1439
  { return allocator_traits_type::max_size(this->m_holder.alloc()); }
1076
1440
 
1077
1441
  //! <b>Effects</b>: Inserts or erases elements at the end such that
1078
- //! the size becomes n. New elements are default constructed.
1442
+ //! the size becomes n. New elements are value initialized.
1079
1443
  //!
1080
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
1444
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move or value initialization throws.
1081
1445
  //!
1082
1446
  //! <b>Complexity</b>: Linear to the difference between size() and new_size.
1083
1447
  void resize(size_type new_size)
1084
- {
1085
- const size_type sz = this->size();
1086
- if (new_size < sz){
1087
- //Destroy last elements
1088
- this->priv_destroy_last_n(sz - new_size);
1089
- }
1090
- else{
1091
- const size_type n = new_size - this->size();
1092
- container_detail::insert_default_constructed_n_proxy<Allocator, T*> proxy(this->m_holder.alloc());
1093
- this->priv_forward_range_insert_at_end(n, proxy, alloc_version());
1094
- }
1095
- }
1448
+ { this->priv_resize(new_size, value_init); }
1449
+
1450
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
1451
+ //! the size becomes n. New elements are default initialized.
1452
+ //!
1453
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move or default initialization throws.
1454
+ //!
1455
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
1456
+ //!
1457
+ //! <b>Note</b>: Non-standard extension
1458
+ void resize(size_type new_size, default_init_t)
1459
+ { this->priv_resize(new_size, default_init); }
1096
1460
 
1097
1461
  //! <b>Effects</b>: Inserts or erases elements at the end such that
1098
1462
  //! the size becomes n. New elements are copy constructed from x.
1099
1463
  //!
1100
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
1464
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
1101
1465
  //!
1102
1466
  //! <b>Complexity</b>: Linear to the difference between size() and new_size.
1103
1467
  void resize(size_type new_size, const T& x)
1104
- {
1105
- const size_type sz = this->size();
1106
- if (new_size < sz){
1107
- //Destroy last elements
1108
- this->priv_destroy_last_n(sz - new_size);
1109
- }
1110
- else{
1111
- const size_type n = new_size - this->size();
1112
- container_detail::insert_n_copies_proxy<Allocator, T*> proxy(this->m_holder.alloc(), x);
1113
- this->priv_forward_range_insert_at_end(n, proxy, alloc_version());
1114
- }
1115
- }
1468
+ { this->priv_resize(new_size, x); }
1116
1469
 
1117
1470
  //! <b>Effects</b>: Number of elements for which memory has been allocated.
1118
1471
  //! capacity() is always greater than or equal to size().
@@ -1120,7 +1473,7 @@ class vector
1120
1473
  //! <b>Throws</b>: Nothing.
1121
1474
  //!
1122
1475
  //! <b>Complexity</b>: Constant.
1123
- size_type capacity() const BOOST_CONTAINER_NOEXCEPT
1476
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
1124
1477
  { return this->m_holder.capacity(); }
1125
1478
 
1126
1479
  //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
@@ -1132,7 +1485,7 @@ class vector
1132
1485
  void reserve(size_type new_cap)
1133
1486
  {
1134
1487
  if (this->capacity() < new_cap){
1135
- this->priv_reserve(new_cap, alloc_version());
1488
+ this->priv_reserve_no_capacity(new_cap, alloc_version());
1136
1489
  }
1137
1490
  }
1138
1491
 
@@ -1159,8 +1512,11 @@ class vector
1159
1512
  //! <b>Throws</b>: Nothing.
1160
1513
  //!
1161
1514
  //! <b>Complexity</b>: Constant.
1162
- reference front() BOOST_CONTAINER_NOEXCEPT
1163
- { return *this->m_holder.start(); }
1515
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
1516
+ {
1517
+ BOOST_ASSERT(!this->empty());
1518
+ return *this->m_holder.start();
1519
+ }
1164
1520
 
1165
1521
  //! <b>Requires</b>: !empty()
1166
1522
  //!
@@ -1170,8 +1526,11 @@ class vector
1170
1526
  //! <b>Throws</b>: Nothing.
1171
1527
  //!
1172
1528
  //! <b>Complexity</b>: Constant.
1173
- const_reference front() const BOOST_CONTAINER_NOEXCEPT
1174
- { return *this->m_holder.start(); }
1529
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
1530
+ {
1531
+ BOOST_ASSERT(!this->empty());
1532
+ return *this->m_holder.start();
1533
+ }
1175
1534
 
1176
1535
  //! <b>Requires</b>: !empty()
1177
1536
  //!
@@ -1181,8 +1540,11 @@ class vector
1181
1540
  //! <b>Throws</b>: Nothing.
1182
1541
  //!
1183
1542
  //! <b>Complexity</b>: Constant.
1184
- reference back() BOOST_CONTAINER_NOEXCEPT
1185
- { return this->m_holder.start()[this->m_holder.m_size - 1]; }
1543
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
1544
+ {
1545
+ BOOST_ASSERT(!this->empty());
1546
+ return this->m_holder.start()[this->m_holder.m_size - 1];
1547
+ }
1186
1548
 
1187
1549
  //! <b>Requires</b>: !empty()
1188
1550
  //!
@@ -1192,8 +1554,11 @@ class vector
1192
1554
  //! <b>Throws</b>: Nothing.
1193
1555
  //!
1194
1556
  //! <b>Complexity</b>: Constant.
1195
- const_reference back() const BOOST_CONTAINER_NOEXCEPT
1196
- { return this->m_holder.start()[this->m_holder.m_size - 1]; }
1557
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
1558
+ {
1559
+ BOOST_ASSERT(!this->empty());
1560
+ return this->m_holder.start()[this->m_holder.m_size - 1];
1561
+ }
1197
1562
 
1198
1563
  //! <b>Requires</b>: size() > n.
1199
1564
  //!
@@ -1203,8 +1568,11 @@ class vector
1203
1568
  //! <b>Throws</b>: Nothing.
1204
1569
  //!
1205
1570
  //! <b>Complexity</b>: Constant.
1206
- reference operator[](size_type n) BOOST_CONTAINER_NOEXCEPT
1207
- { return this->m_holder.start()[n]; }
1571
+ reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
1572
+ {
1573
+ BOOST_ASSERT(this->m_holder.m_size > n);
1574
+ return this->m_holder.start()[n];
1575
+ }
1208
1576
 
1209
1577
  //! <b>Requires</b>: size() > n.
1210
1578
  //!
@@ -1214,8 +1582,78 @@ class vector
1214
1582
  //! <b>Throws</b>: Nothing.
1215
1583
  //!
1216
1584
  //! <b>Complexity</b>: Constant.
1217
- const_reference operator[](size_type n) const BOOST_CONTAINER_NOEXCEPT
1218
- { return this->m_holder.start()[n]; }
1585
+ const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
1586
+ {
1587
+ BOOST_ASSERT(this->m_holder.m_size > n);
1588
+ return this->m_holder.start()[n];
1589
+ }
1590
+
1591
+ //! <b>Requires</b>: size() >= n.
1592
+ //!
1593
+ //! <b>Effects</b>: Returns an iterator to the nth element
1594
+ //! from the beginning of the container. Returns end()
1595
+ //! if n == size().
1596
+ //!
1597
+ //! <b>Throws</b>: Nothing.
1598
+ //!
1599
+ //! <b>Complexity</b>: Constant.
1600
+ //!
1601
+ //! <b>Note</b>: Non-standard extension
1602
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
1603
+ {
1604
+ BOOST_ASSERT(this->m_holder.m_size >= n);
1605
+ return iterator(this->m_holder.start()+n);
1606
+ }
1607
+
1608
+ //! <b>Requires</b>: size() >= n.
1609
+ //!
1610
+ //! <b>Effects</b>: Returns a const_iterator to the nth element
1611
+ //! from the beginning of the container. Returns end()
1612
+ //! if n == size().
1613
+ //!
1614
+ //! <b>Throws</b>: Nothing.
1615
+ //!
1616
+ //! <b>Complexity</b>: Constant.
1617
+ //!
1618
+ //! <b>Note</b>: Non-standard extension
1619
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
1620
+ {
1621
+ BOOST_ASSERT(this->m_holder.m_size >= n);
1622
+ return const_iterator(this->m_holder.start()+n);
1623
+ }
1624
+
1625
+ //! <b>Requires</b>: size() >= n.
1626
+ //!
1627
+ //! <b>Effects</b>: Returns an iterator to the nth element
1628
+ //! from the beginning of the container. Returns end()
1629
+ //! if n == size().
1630
+ //!
1631
+ //! <b>Throws</b>: Nothing.
1632
+ //!
1633
+ //! <b>Complexity</b>: Constant.
1634
+ //!
1635
+ //! <b>Note</b>: Non-standard extension
1636
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
1637
+ {
1638
+ //Range check assert done in priv_index_of
1639
+ return this->priv_index_of(vector_iterator_get_ptr(p));
1640
+ }
1641
+
1642
+ //! <b>Requires</b>: begin() <= p <= end().
1643
+ //!
1644
+ //! <b>Effects</b>: Returns the index of the element pointed by p
1645
+ //! and size() if p == end().
1646
+ //!
1647
+ //! <b>Throws</b>: Nothing.
1648
+ //!
1649
+ //! <b>Complexity</b>: Constant.
1650
+ //!
1651
+ //! <b>Note</b>: Non-standard extension
1652
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
1653
+ {
1654
+ //Range check assert done in priv_index_of
1655
+ return this->priv_index_of(vector_iterator_get_ptr(p));
1656
+ }
1219
1657
 
1220
1658
  //! <b>Requires</b>: size() > n.
1221
1659
  //!
@@ -1226,7 +1664,10 @@ class vector
1226
1664
  //!
1227
1665
  //! <b>Complexity</b>: Constant.
1228
1666
  reference at(size_type n)
1229
- { this->priv_check_range(n); return this->m_holder.start()[n]; }
1667
+ {
1668
+ this->priv_throw_if_out_of_range(n);
1669
+ return this->m_holder.start()[n];
1670
+ }
1230
1671
 
1231
1672
  //! <b>Requires</b>: size() > n.
1232
1673
  //!
@@ -1237,7 +1678,10 @@ class vector
1237
1678
  //!
1238
1679
  //! <b>Complexity</b>: Constant.
1239
1680
  const_reference at(size_type n) const
1240
- { this->priv_check_range(n); return this->m_holder.start()[n]; }
1681
+ {
1682
+ this->priv_throw_if_out_of_range(n);
1683
+ return this->m_holder.start()[n];
1684
+ }
1241
1685
 
1242
1686
  //////////////////////////////////////////////
1243
1687
  //
@@ -1245,23 +1689,23 @@ class vector
1245
1689
  //
1246
1690
  //////////////////////////////////////////////
1247
1691
 
1248
- //! <b>Returns</b>: Allocator pointer such that [data(),data() + size()) is a valid range.
1692
+ //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
1249
1693
  //! For a non-empty vector, data() == &front().
1250
1694
  //!
1251
1695
  //! <b>Throws</b>: Nothing.
1252
1696
  //!
1253
1697
  //! <b>Complexity</b>: Constant.
1254
- T* data() BOOST_CONTAINER_NOEXCEPT
1255
- { return container_detail::to_raw_pointer(this->m_holder.start()); }
1698
+ T* data() BOOST_NOEXCEPT_OR_NOTHROW
1699
+ { return this->priv_raw_begin(); }
1256
1700
 
1257
- //! <b>Returns</b>: Allocator pointer such that [data(),data() + size()) is a valid range.
1701
+ //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
1258
1702
  //! For a non-empty vector, data() == &front().
1259
1703
  //!
1260
1704
  //! <b>Throws</b>: Nothing.
1261
1705
  //!
1262
1706
  //! <b>Complexity</b>: Constant.
1263
- const T * data() const BOOST_CONTAINER_NOEXCEPT
1264
- { return container_detail::to_raw_pointer(this->m_holder.start()); }
1707
+ const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
1708
+ { return this->priv_raw_begin(); }
1265
1709
 
1266
1710
  //////////////////////////////////////////////
1267
1711
  //
@@ -1269,86 +1713,111 @@ class vector
1269
1713
  //
1270
1714
  //////////////////////////////////////////////
1271
1715
 
1272
- #if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1716
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1273
1717
  //! <b>Effects</b>: Inserts an object of type T constructed with
1274
1718
  //! std::forward<Args>(args)... in the end of the vector.
1275
1719
  //!
1276
1720
  //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
1277
- //! T's move constructor throws.
1721
+ //! T's copy/move constructor throws.
1278
1722
  //!
1279
1723
  //! <b>Complexity</b>: Amortized constant time.
1280
1724
  template<class ...Args>
1281
- void emplace_back(Args &&...args)
1725
+ void emplace_back(BOOST_FWD_REF(Args)...args)
1282
1726
  {
1283
- T* back_pos = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
1284
- if (this->m_holder.m_size < this->m_holder.capacity()){
1727
+ if (BOOST_LIKELY(this->room_enough())){
1285
1728
  //There is more memory, just construct a new object at the end
1286
- allocator_traits_type::construct(this->m_holder.alloc(), back_pos, ::boost::forward<Args>(args)...);
1729
+ allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
1287
1730
  ++this->m_holder.m_size;
1288
1731
  }
1289
1732
  else{
1290
1733
  typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> type;
1291
1734
  this->priv_forward_range_insert_no_capacity
1292
- (vector_iterator_get_ptr(this->cend()), 1, type(this->m_holder.alloc(), ::boost::forward<Args>(args)...), alloc_version());
1735
+ (this->back_ptr(), 1, type(::boost::forward<Args>(args)...), alloc_version());
1293
1736
  }
1294
1737
  }
1295
1738
 
1739
+ //! <b>Effects</b>: Inserts an object of type T constructed with
1740
+ //! std::forward<Args>(args)... in the end of the vector.
1741
+ //!
1742
+ //! <b>Throws</b>: If the in-place constructor throws.
1743
+ //!
1744
+ //! <b>Complexity</b>: Constant time.
1745
+ //!
1746
+ //! <b>Note</b>: Non-standard extension.
1747
+ template<class ...Args>
1748
+ bool stable_emplace_back(BOOST_FWD_REF(Args)...args)
1749
+ {
1750
+ const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));
1751
+ if (BOOST_LIKELY(is_room_enough)){
1752
+ //There is more memory, just construct a new object at the end
1753
+ allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
1754
+ ++this->m_holder.m_size;
1755
+ }
1756
+ return is_room_enough;
1757
+ }
1758
+
1296
1759
  //! <b>Requires</b>: position must be a valid iterator of *this.
1297
1760
  //!
1298
1761
  //! <b>Effects</b>: Inserts an object of type T constructed with
1299
1762
  //! std::forward<Args>(args)... before position
1300
1763
  //!
1301
1764
  //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
1302
- //! T's move constructor/assignment throws.
1765
+ //! T's copy/move constructor/assignment throws.
1303
1766
  //!
1304
1767
  //! <b>Complexity</b>: If position is end(), amortized constant time
1305
1768
  //! Linear time otherwise.
1306
1769
  template<class ...Args>
1307
- iterator emplace(const_iterator position, Args && ...args)
1770
+ iterator emplace(const_iterator position, BOOST_FWD_REF(Args) ...args)
1308
1771
  {
1772
+ BOOST_ASSERT(this->priv_in_range_or_end(position));
1309
1773
  //Just call more general insert(pos, size, value) and return iterator
1310
1774
  typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> type;
1311
- return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1, type(this->m_holder.alloc()
1312
- , ::boost::forward<Args>(args)...), alloc_version());
1313
- }
1314
-
1315
- #else
1775
+ return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1
1776
+ , type(::boost::forward<Args>(args)...));
1777
+ }
1778
+
1779
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
1780
+
1781
+ #define BOOST_CONTAINER_VECTOR_EMPLACE_CODE(N) \
1782
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
1783
+ void emplace_back(BOOST_MOVE_UREF##N)\
1784
+ {\
1785
+ if (BOOST_LIKELY(this->room_enough())){\
1786
+ allocator_traits_type::construct (this->m_holder.alloc()\
1787
+ , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
1788
+ ++this->m_holder.m_size;\
1789
+ }\
1790
+ else{\
1791
+ typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
1792
+ this->priv_forward_range_insert_no_capacity\
1793
+ ( this->back_ptr(), 1, type(BOOST_MOVE_FWD##N), alloc_version());\
1794
+ }\
1795
+ }\
1796
+ \
1797
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
1798
+ bool stable_emplace_back(BOOST_MOVE_UREF##N)\
1799
+ {\
1800
+ const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));\
1801
+ if (BOOST_LIKELY(is_room_enough)){\
1802
+ allocator_traits_type::construct (this->m_holder.alloc()\
1803
+ , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
1804
+ ++this->m_holder.m_size;\
1805
+ }\
1806
+ return is_room_enough;\
1807
+ }\
1808
+ \
1809
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
1810
+ iterator emplace(const_iterator pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
1811
+ {\
1812
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));\
1813
+ typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
1814
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), 1, type(BOOST_MOVE_FWD##N));\
1815
+ }\
1816
+ //
1817
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_VECTOR_EMPLACE_CODE)
1818
+ #undef BOOST_CONTAINER_VECTOR_EMPLACE_CODE
1316
1819
 
1317
- #define BOOST_PP_LOCAL_MACRO(n) \
1318
- BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
1319
- void emplace_back(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
1320
- { \
1321
- T* back_pos = container_detail::to_raw_pointer \
1322
- (this->m_holder.start()) + this->m_holder.m_size; \
1323
- if (this->m_holder.m_size < this->m_holder.capacity()){ \
1324
- allocator_traits_type::construct (this->m_holder.alloc() \
1325
- , back_pos BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
1326
- ++this->m_holder.m_size; \
1327
- } \
1328
- else{ \
1329
- container_detail::BOOST_PP_CAT(insert_emplace_proxy_arg, n) \
1330
- <Allocator, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy \
1331
- (this->m_holder.alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
1332
- this->priv_forward_range_insert_no_capacity \
1333
- (vector_iterator_get_ptr(this->cend()), 1, proxy, alloc_version()); \
1334
- } \
1335
- } \
1336
- \
1337
- BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
1338
- iterator emplace(const_iterator pos \
1339
- BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
1340
- { \
1341
- container_detail::BOOST_PP_CAT(insert_emplace_proxy_arg, n) \
1342
- <Allocator, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy \
1343
- (this->m_holder.alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
1344
- return this->priv_forward_range_insert \
1345
- (container_detail::to_raw_pointer(vector_iterator_get_ptr(pos)), 1, proxy, alloc_version()); \
1346
- } \
1347
- //!
1348
- #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
1349
- #include BOOST_PP_LOCAL_ITERATE()
1350
-
1351
- #endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
1820
+ #endif
1352
1821
 
1353
1822
  #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1354
1823
  //! <b>Effects</b>: Inserts a copy of x at the end of the vector.
@@ -1360,17 +1829,17 @@ class vector
1360
1829
  void push_back(const T &x);
1361
1830
 
1362
1831
  //! <b>Effects</b>: Constructs a new element in the end of the vector
1363
- //! and moves the resources of mx to this new element.
1832
+ //! and moves the resources of x to this new element.
1364
1833
  //!
1365
1834
  //! <b>Throws</b>: If memory allocation throws or
1366
- //! T's move constructor throws.
1835
+ //! T's copy/move constructor throws.
1367
1836
  //!
1368
1837
  //! <b>Complexity</b>: Amortized constant time.
1369
1838
  void push_back(T &&x);
1370
1839
  #else
1371
1840
  BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
1372
1841
  #endif
1373
-
1842
+
1374
1843
  #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1375
1844
  //! <b>Requires</b>: position must be a valid iterator of *this.
1376
1845
  //!
@@ -1384,7 +1853,7 @@ class vector
1384
1853
 
1385
1854
  //! <b>Requires</b>: position must be a valid iterator of *this.
1386
1855
  //!
1387
- //! <b>Effects</b>: Insert a new element before position with mx's resources.
1856
+ //! <b>Effects</b>: Insert a new element before position with x's resources.
1388
1857
  //!
1389
1858
  //! <b>Throws</b>: If memory allocation throws.
1390
1859
  //!
@@ -1392,7 +1861,7 @@ class vector
1392
1861
  //! Linear time otherwise.
1393
1862
  iterator insert(const_iterator position, T &&x);
1394
1863
  #else
1395
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator)
1864
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
1396
1865
  #endif
1397
1866
 
1398
1867
  //! <b>Requires</b>: p must be a valid iterator of *this.
@@ -1401,13 +1870,14 @@ class vector
1401
1870
  //!
1402
1871
  //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
1403
1872
  //!
1404
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
1873
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor throws.
1405
1874
  //!
1406
1875
  //! <b>Complexity</b>: Linear to n.
1407
1876
  iterator insert(const_iterator p, size_type n, const T& x)
1408
1877
  {
1409
- container_detail::insert_n_copies_proxy<Allocator, T*> proxy(this->m_holder.alloc(), x);
1410
- return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy, alloc_version());
1878
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
1879
+ container_detail::insert_n_copies_proxy<Allocator, T*> proxy(x);
1880
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy);
1411
1881
  }
1412
1882
 
1413
1883
  //! <b>Requires</b>: p must be a valid iterator of *this.
@@ -1419,17 +1889,19 @@ class vector
1419
1889
  //! <b>Throws</b>: If memory allocation throws, T's constructor from a
1420
1890
  //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
1421
1891
  //!
1422
- //! <b>Complexity</b>: Linear to std::distance [first, last).
1892
+ //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
1423
1893
  template <class InIt>
1424
1894
  iterator insert(const_iterator pos, InIt first, InIt last
1425
1895
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1426
- , typename container_detail::enable_if_c
1427
- < !container_detail::is_convertible<InIt, size_type>::value
1428
- && container_detail::is_input_iterator<InIt>::value
1896
+ , typename container_detail::disable_if_or
1897
+ < void
1898
+ , container_detail::is_convertible<InIt, size_type>
1899
+ , container_detail::is_not_input_iterator<InIt>
1429
1900
  >::type * = 0
1430
1901
  #endif
1431
1902
  )
1432
1903
  {
1904
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
1433
1905
  const size_type n_pos = pos - this->cbegin();
1434
1906
  iterator it(vector_iterator_get_ptr(pos));
1435
1907
  for(;first != last; ++first){
@@ -1442,27 +1914,72 @@ class vector
1442
1914
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1443
1915
  template <class FwdIt>
1444
1916
  iterator insert(const_iterator pos, FwdIt first, FwdIt last
1445
- , typename container_detail::enable_if_c
1446
- < !container_detail::is_convertible<FwdIt, size_type>::value
1447
- && !container_detail::is_input_iterator<FwdIt>::value
1917
+ , typename container_detail::disable_if_or
1918
+ < void
1919
+ , container_detail::is_convertible<FwdIt, size_type>
1920
+ , container_detail::is_input_iterator<FwdIt>
1448
1921
  >::type * = 0
1449
1922
  )
1450
1923
  {
1451
- container_detail::insert_range_proxy<Allocator, FwdIt, T*> proxy(this->m_holder.alloc(), first);
1452
- return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), std::distance(first, last), proxy, alloc_version());
1924
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
1925
+ container_detail::insert_range_proxy<Allocator, FwdIt, T*> proxy(first);
1926
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), boost::container::iterator_distance(first, last), proxy);
1927
+ }
1928
+ #endif
1929
+
1930
+ //! <b>Requires</b>: p must be a valid iterator of *this. num, must
1931
+ //! be equal to boost::container::iterator_distance(first, last)
1932
+ //!
1933
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
1934
+ //!
1935
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
1936
+ //!
1937
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
1938
+ //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
1939
+ //!
1940
+ //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
1941
+ //!
1942
+ //! <b>Note</b>: This function avoids a linear operation to calculate boost::container::iterator_distance[first, last)
1943
+ //! for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a
1944
+ //! a non-standard extension.
1945
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1946
+ template <class InIt>
1947
+ iterator insert(const_iterator pos, size_type num, InIt first, InIt last)
1948
+ {
1949
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
1950
+ BOOST_ASSERT(container_detail::is_input_iterator<InIt>::value ||
1951
+ num == static_cast<size_type>(boost::container::iterator_distance(first, last)));
1952
+ (void)last;
1953
+ container_detail::insert_range_proxy<Allocator, InIt, T*> proxy(first);
1954
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), num, proxy);
1955
+ }
1956
+ #endif
1957
+
1958
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1959
+ //! <b>Requires</b>: position must be a valid iterator of *this.
1960
+ //!
1961
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before position.
1962
+ //!
1963
+ //! <b>Returns</b>: an iterator to the first inserted element or position if first == last.
1964
+ //!
1965
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
1966
+ iterator insert(const_iterator position, std::initializer_list<value_type> il)
1967
+ {
1968
+ //Assertion done in insert()
1969
+ return this->insert(position, il.begin(), il.end());
1453
1970
  }
1454
1971
  #endif
1455
1972
 
1456
- //! <b>Effects</b>: Removes the last element from the vector.
1973
+ //! <b>Effects</b>: Removes the last element from the container.
1457
1974
  //!
1458
1975
  //! <b>Throws</b>: Nothing.
1459
1976
  //!
1460
1977
  //! <b>Complexity</b>: Constant time.
1461
- void pop_back() BOOST_CONTAINER_NOEXCEPT
1978
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
1462
1979
  {
1980
+ BOOST_ASSERT(!this->empty());
1463
1981
  //Destroy last element
1464
- --this->m_holder.m_size;
1465
- this->priv_destroy(container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size);
1982
+ this->priv_destroy_last();
1466
1983
  }
1467
1984
 
1468
1985
  //! <b>Effects</b>: Erases the element at position pos.
@@ -1473,12 +1990,14 @@ class vector
1473
1990
  //! last element. Constant if pos is the last element.
1474
1991
  iterator erase(const_iterator position)
1475
1992
  {
1476
- T *const pos = container_detail::to_raw_pointer(vector_iterator_get_ptr(position));
1477
- T *const beg = container_detail::to_raw_pointer(this->m_holder.start());
1993
+ BOOST_ASSERT(this->priv_in_range(position));
1994
+ const pointer p = vector_iterator_get_ptr(position);
1995
+ T *const pos_ptr = container_detail::to_raw_pointer(p);
1996
+ T *const beg_ptr = this->priv_raw_begin();
1997
+ T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr);
1478
1998
  //Move elements forward and destroy last
1479
- this->priv_destroy(::boost::move(pos + 1, beg + this->m_holder.m_size, pos));
1480
- --this->m_holder.m_size;
1481
- return iterator(vector_iterator_get_ptr(position));
1999
+ this->priv_destroy_last(pos_ptr == new_end_ptr);
2000
+ return iterator(p);
1482
2001
  }
1483
2002
 
1484
2003
  //! <b>Effects</b>: Erases the elements pointed by [first, last).
@@ -1489,16 +2008,14 @@ class vector
1489
2008
  //! plus linear to the elements between pos and the last element.
1490
2009
  iterator erase(const_iterator first, const_iterator last)
1491
2010
  {
2011
+ BOOST_ASSERT(first == last ||
2012
+ (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
1492
2013
  if (first != last){
1493
- T* const end_pos = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
1494
- T* const ptr = container_detail::to_raw_pointer(boost::move
1495
- (container_detail::to_raw_pointer(vector_iterator_get_ptr(last))
1496
- ,end_pos
1497
- ,container_detail::to_raw_pointer(vector_iterator_get_ptr(first))
1498
- ));
1499
- const size_type destroyed = (end_pos - ptr);
1500
- boost::container::destroy_alloc_n(this->get_stored_allocator(), ptr, destroyed);
1501
- this->m_holder.m_size -= destroyed;
2014
+ T* const old_end_ptr = this->priv_raw_end();
2015
+ T* const first_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(first));
2016
+ T* const last_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(last));
2017
+ T* const ptr = container_detail::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr));
2018
+ this->priv_destroy_last_n(old_end_ptr - ptr);
1502
2019
  }
1503
2020
  return iterator(vector_iterator_get_ptr(first));
1504
2021
  }
@@ -1508,146 +2025,444 @@ class vector
1508
2025
  //! <b>Throws</b>: Nothing.
1509
2026
  //!
1510
2027
  //! <b>Complexity</b>: Constant.
1511
- void swap(vector& x) BOOST_CONTAINER_NOEXCEPT_IF((!container_detail::is_same<alloc_version, allocator_v0>::value))
2028
+ void swap(vector& x)
2029
+ BOOST_NOEXCEPT_IF( ((allocator_traits_type::propagate_on_container_swap::value
2030
+ || allocator_traits_type::is_always_equal::value) &&
2031
+ !container_detail::is_version<Allocator, 0>::value))
1512
2032
  {
1513
- //Just swap internals in case of !allocator_v0. Otherwise, deep swap
1514
- this->m_holder.swap(x.m_holder);
1515
- //And now the allocator
1516
- container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
1517
- container_detail::swap_alloc(this->m_holder.alloc(), x.m_holder.alloc(), flag);
2033
+ this->priv_swap(x, container_detail::bool_<container_detail::is_version<Allocator, 0>::value>());
2034
+ }
2035
+
2036
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2037
+
2038
+ //! <b>Effects</b>: Swaps the contents of *this and x.
2039
+ //!
2040
+ //! <b>Throws</b>: Nothing.
2041
+ //!
2042
+ //! <b>Complexity</b>: Linear
2043
+ //!
2044
+ //! <b>Note</b>: Non-standard extension to support static_vector
2045
+ template<class OtherAllocator>
2046
+ void swap(vector<T, OtherAllocator> & x
2047
+ , typename container_detail::enable_if_and
2048
+ < void
2049
+ , container_detail::is_version<OtherAllocator, 0>
2050
+ , container_detail::is_different<OtherAllocator, allocator_type>
2051
+ >::type * = 0
2052
+ )
2053
+ { this->m_holder.deep_swap(x.m_holder); }
2054
+
2055
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2056
+
2057
+ //! <b>Effects</b>: Erases all the elements of the vector.
2058
+ //!
2059
+ //! <b>Throws</b>: Nothing.
2060
+ //!
2061
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2062
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW
2063
+ { this->priv_destroy_all(); }
2064
+
2065
+ //! <b>Effects</b>: Returns true if x and y are equal
2066
+ //!
2067
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2068
+ friend bool operator==(const vector& x, const vector& y)
2069
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
2070
+
2071
+ //! <b>Effects</b>: Returns true if x and y are unequal
2072
+ //!
2073
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2074
+ friend bool operator!=(const vector& x, const vector& y)
2075
+ { return !(x == y); }
2076
+
2077
+ //! <b>Effects</b>: Returns true if x is less than y
2078
+ //!
2079
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2080
+ friend bool operator<(const vector& x, const vector& y)
2081
+ {
2082
+ const_iterator first1(x.cbegin()), first2(y.cbegin());
2083
+ const const_iterator last1(x.cend()), last2(y.cend());
2084
+ for ( ; (first1 != last1) && (first2 != last2); ++first1, ++first2 ) {
2085
+ if (*first1 < *first2) return true;
2086
+ if (*first2 < *first1) return false;
2087
+ }
2088
+ return (first1 == last1) && (first2 != last2);
2089
+ }
2090
+
2091
+ //! <b>Effects</b>: Returns true if x is greater than y
2092
+ //!
2093
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2094
+ friend bool operator>(const vector& x, const vector& y)
2095
+ { return y < x; }
2096
+
2097
+ //! <b>Effects</b>: Returns true if x is equal or less than y
2098
+ //!
2099
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2100
+ friend bool operator<=(const vector& x, const vector& y)
2101
+ { return !(y < x); }
2102
+
2103
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
2104
+ //!
2105
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
2106
+ friend bool operator>=(const vector& x, const vector& y)
2107
+ { return !(x < y); }
2108
+
2109
+ //! <b>Effects</b>: x.swap(y)
2110
+ //!
2111
+ //! <b>Complexity</b>: Constant.
2112
+ friend void swap(vector& x, vector& y)
2113
+ { x.swap(y); }
2114
+
2115
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2116
+ //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
2117
+ //! effect. Otherwise, it is a request for allocation of additional memory
2118
+ //! (memory expansion) that will not invalidate iterators.
2119
+ //! If the request is successful, then capacity() is greater than or equal to
2120
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
2121
+ //!
2122
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
2123
+ //!
2124
+ //! <b>Note</b>: Non-standard extension.
2125
+ bool stable_reserve(size_type new_cap)
2126
+ {
2127
+ const size_type cp = this->capacity();
2128
+ return cp >= new_cap || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(new_cap - cp));
2129
+ }
2130
+
2131
+ //Absolutely experimental. This function might change, disappear or simply crash!
2132
+ template<class BiDirPosConstIt, class BiDirValueIt>
2133
+ void insert_ordered_at(const size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
2134
+ {
2135
+ typedef container_detail::vector_insert_ordered_cursor<BiDirPosConstIt, BiDirValueIt> inserter_t;
2136
+ return this->priv_insert_ordered_at(element_count, inserter_t(last_position_it, last_value_it));
2137
+ }
2138
+
2139
+ template<class BidirIt>
2140
+ void merge(BidirIt first, BidirIt last)
2141
+ { this->merge(first, last, value_less()); }
2142
+
2143
+ template<class BidirIt, class Compare>
2144
+ void merge(BidirIt first, BidirIt last, Compare comp)
2145
+ { this->priv_merge(container_detail::false_type(), first, last, comp); }
2146
+
2147
+ template<class BidirIt>
2148
+ void merge_unique(BidirIt first, BidirIt last)
2149
+ { this->priv_merge(container_detail::true_type(), first, last, value_less()); }
2150
+
2151
+ template<class BidirIt, class Compare>
2152
+ void merge_unique(BidirIt first, BidirIt last, Compare comp)
2153
+ { this->priv_merge(container_detail::true_type(), first, last, comp); }
2154
+
2155
+ private:
2156
+ template<class PositionValue>
2157
+ void priv_insert_ordered_at(const size_type element_count, PositionValue position_value)
2158
+ {
2159
+ const size_type old_size_pos = this->size();
2160
+ this->reserve(old_size_pos + element_count);
2161
+ T* const begin_ptr = this->priv_raw_begin();
2162
+ size_type insertions_left = element_count;
2163
+ size_type prev_pos = old_size_pos;
2164
+ size_type old_hole_size = element_count;
2165
+
2166
+ //Exception rollback. If any copy throws before the hole is filled, values
2167
+ //already inserted/copied at the end of the buffer will be destroyed.
2168
+ typename value_traits::ArrayDestructor past_hole_values_destroyer
2169
+ (begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
2170
+ //Loop for each insertion backwards, first moving the elements after the insertion point,
2171
+ //then inserting the element.
2172
+ while(insertions_left){
2173
+ --position_value;
2174
+ size_type const pos = position_value.get_pos();
2175
+ BOOST_ASSERT(pos != size_type(-1) && pos <= old_size_pos && pos <= prev_pos);
2176
+ //If needed shift the range after the insertion point and the previous insertion point.
2177
+ //Function will take care if the shift crosses the size() boundary, using copy/move
2178
+ //or uninitialized copy/move if necessary.
2179
+ size_type new_hole_size = (pos != prev_pos)
2180
+ ? priv_insert_ordered_at_shift_range(pos, prev_pos, this->size(), insertions_left)
2181
+ : old_hole_size
2182
+ ;
2183
+ if(new_hole_size){
2184
+ //The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
2185
+ past_hole_values_destroyer.increment_size_backwards(prev_pos - pos);
2186
+ //Insert the new value in the hole
2187
+ allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, position_value.get_val());
2188
+ if(--new_hole_size){
2189
+ //The hole was reduced by the new insertion by one
2190
+ past_hole_values_destroyer.increment_size_backwards(size_type(1u));
2191
+ }
2192
+ else{
2193
+ //Hole was just filled, disable exception rollback and change vector size
2194
+ past_hole_values_destroyer.release();
2195
+ this->m_holder.m_size += element_count;
2196
+ }
2197
+ }
2198
+ else{
2199
+ if(old_hole_size){
2200
+ //Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
2201
+ past_hole_values_destroyer.release();
2202
+ this->m_holder.m_size += element_count;
2203
+ }
2204
+ //Insert the new value in the already constructed range
2205
+ begin_ptr[pos + insertions_left - 1] = position_value.get_val();
2206
+ }
2207
+ --insertions_left;
2208
+ old_hole_size = new_hole_size;
2209
+ prev_pos = pos;
2210
+ }
1518
2211
  }
1519
2212
 
1520
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
1521
-
1522
- //! <b>Effects</b>: Swaps the contents of *this and x.
1523
- //!
1524
- //! <b>Throws</b>: If T's move constructor throws.
1525
- //!
1526
- //! <b>Complexity</b>: Linear
1527
- //!
1528
- //! <b>Note</b>: non-standard extension.
1529
- template<class OtherAllocator>
1530
- void swap(vector<T, OtherAllocator> & x)
1531
- {
1532
- this->m_holder.swap(x.m_holder);
2213
+ template<class UniqueBool, class BidirIt, class Compare>
2214
+ void priv_merge(UniqueBool, BidirIt first, BidirIt last, Compare comp)
2215
+ {
2216
+ size_type const n = static_cast<size_type>(boost::container::iterator_distance(first, last));
2217
+ size_type const s = this->size();
2218
+ if(BOOST_LIKELY(s)){
2219
+ size_type const c = this->capacity();
2220
+ size_type const free_c = (c - s);
2221
+ //Use a new buffer if current one is too small for new elements,
2222
+ //or there is no room for position indexes
2223
+ if(free_c < n){
2224
+ size_type const new_size = s + n;
2225
+ size_type new_cap = new_size;
2226
+ pointer p = pointer();
2227
+ p = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
2228
+ this->priv_merge_in_new_buffer(UniqueBool(), first, n, comp, p, new_cap);
2229
+ }
2230
+ else if(!UniqueBool::value && free_c >= n){
2231
+ typedef container_detail::vector_merge_cursor<T, size_type, BidirIt, Compare> inserter_t;
2232
+ T* const pbeg = this->priv_raw_begin();
2233
+ return this->priv_insert_ordered_at(n, inserter_t(pbeg, pbeg + s, last, comp));
2234
+ }
2235
+ else{ //UniqueBool::value == true and free_c >= n
2236
+ std::size_t remaining = n;
2237
+ static const std::size_t PosCount = 64u;
2238
+ size_type positions[PosCount];
2239
+ size_type *indexes = 0;
2240
+ while(remaining){
2241
+ //Query for room to store indexes in the remaining buffer
2242
+ uintptr_t const szt_align_mask = container_detail::alignment_of<size_type>::value - 1;
2243
+ boost::uintptr_t const addr = boost::uintptr_t(this->priv_raw_begin() + s + n);
2244
+ boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c);
2245
+ boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask;
2246
+ indexes = reinterpret_cast<size_type *>(aligned_addr);
2247
+ std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - addr)/sizeof(size_type);
2248
+
2249
+ //Capacity is constant, we're not going to change it
2250
+ if(index_capacity < PosCount){
2251
+ indexes = positions;
2252
+ index_capacity = PosCount;
2253
+ }
2254
+ if(index_capacity > remaining)
2255
+ index_capacity = remaining;
2256
+ BidirIt limit = first;
2257
+ boost::container::iterator_advance(limit, index_capacity);
2258
+ this->priv_insert_ordered_range(UniqueBool(), index_capacity, first, limit, indexes, comp);
2259
+ first = limit;
2260
+ remaining -= index_capacity;
2261
+ }
2262
+ }
2263
+ }
2264
+ else{
2265
+ this->insert(this->cend(), n, first, last);
2266
+ }
1533
2267
  }
1534
2268
 
1535
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2269
+ template <class UniqueBool, class BidirIt, class Compare>
2270
+ void priv_insert_ordered_range
2271
+ (UniqueBool, size_type const n, BidirIt first, BidirIt const last, size_type positions[], Compare comp)
2272
+ {
2273
+ //Linear: at most N + M -1 comparisons
2274
+ //Log: MlogN
2275
+ //Average
2276
+ //Linear: N + M - 2
2277
+ //Log: MlogN
2278
+ //N+M - 2
2279
+ //N
2280
+ //(N+M)/2 < MlogN
2281
+ //(N/M+1)/2 <= logN
2282
+ //bool const linear = !s || !n || (s <= n) || ((s+n)/n/2 < logN);
2283
+ size_type const s = this->size();
2284
+ size_type remaining = n;
2285
+ T* const pbeg = this->priv_raw_begin();
2286
+ T* const pend = pbeg + s;
2287
+ T* pcur = pbeg;
2288
+ size_type *position = positions;
2289
+ size_type added_in_middle = 0;
2290
+ if(first != last && pcur != pend){
2291
+ while(1){
2292
+ //maintain stability moving external values only if they are strictly less
2293
+ if(comp(*first, *pcur)) {
2294
+ *position = static_cast<size_type>(pcur - pbeg);
2295
+ BOOST_ASSERT((position == positions) || (*(position-1) == size_type(-1)) || (*(position-1) <= *position));
2296
+ ++position;
2297
+ ++added_in_middle;
2298
+ --remaining;
2299
+ if(++first == last) break;
2300
+ }
2301
+ else if(UniqueBool::value && !comp(*pcur, *first)){
2302
+ *position = size_type(-1);
2303
+ ++position;
2304
+ --remaining;
2305
+ if(++first == last) break;
2306
+ }
2307
+ else{
2308
+ if(++pcur == pend) break;
2309
+ }
2310
+ }
2311
+ }
2312
+ this->insert_ordered_at(added_in_middle, position, first);
2313
+ this->insert(this->cend(), remaining, first, last);
2314
+ }
2315
+
2316
+ template<class UniqueBool, class FwdIt, class Compare>
2317
+ void priv_merge_in_new_buffer
2318
+ (UniqueBool, FwdIt first, size_type n, Compare comp, pointer new_storage, size_type const new_cap)
2319
+ {
2320
+ BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n);
2321
+ allocator_type &a = this->m_holder.alloc();
2322
+ typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap);
2323
+ typename value_traits::ArrayDestructor new_values_destroyer(new_storage, a, 0u);
2324
+ T* pbeg = this->priv_raw_begin();
2325
+ size_type const old_size = this->size();
2326
+ T* const pend = pbeg + old_size;
2327
+ T* d_first = container_detail::to_raw_pointer(new_storage);
2328
+ size_type added = n;
2329
+ //Merge in new buffer loop
2330
+ while(1){
2331
+ if(!n) {
2332
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pbeg, pend, d_first);
2333
+ break;
2334
+ }
2335
+ else if(pbeg == pend) {
2336
+ ::boost::container::uninitialized_move_alloc_n(this->m_holder.alloc(), first, n, d_first);
2337
+ break;
2338
+ }
2339
+ //maintain stability moving external values only if they are strictly less
2340
+ else if(comp(*first, *pbeg)) {
2341
+ allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*first) );
2342
+ new_values_destroyer.increment_size(1u);
2343
+ ++first;
2344
+ --n;
2345
+ ++d_first;
2346
+ }
2347
+ else if(UniqueBool::value && !comp(*pbeg, *first)){
2348
+ ++first;
2349
+ --n;
2350
+ --added;
2351
+ }
2352
+ else{
2353
+ allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*pbeg) );
2354
+ new_values_destroyer.increment_size(1u);
2355
+ ++pbeg;
2356
+ ++d_first;
2357
+ }
2358
+ }
1536
2359
 
1537
- //! <b>Effects</b>: Erases all the elements of the vector.
1538
- //!
1539
- //! <b>Throws</b>: Nothing.
1540
- //!
1541
- //! <b>Complexity</b>: Linear to the number of elements in the vector.
1542
- void clear() BOOST_CONTAINER_NOEXCEPT
1543
- { this->priv_destroy_all(); }
2360
+ //Nothrow operations
2361
+ pointer const old_p = this->m_holder.start();
2362
+ size_type const old_cap = this->m_holder.capacity();
2363
+ boost::container::destroy_alloc_n(a, container_detail::to_raw_pointer(old_p), old_size);
2364
+ a.deallocate(old_p, old_cap);
2365
+ this->m_holder.m_size = old_size + added;
2366
+ this->m_holder.start(new_storage);
2367
+ this->m_holder.capacity(new_cap);
2368
+ new_buffer_deallocator.release();
2369
+ new_values_destroyer.release();
2370
+ }
1544
2371
 
1545
- /// @cond
2372
+ bool room_enough() const
2373
+ { return this->m_holder.m_size < this->m_holder.capacity(); }
1546
2374
 
1547
- //Absolutely experimental. This function might change, disappear or simply crash!
1548
- template<class BiDirPosConstIt, class BiDirValueIt>
1549
- void insert_ordered_at(size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
1550
- {
1551
- const size_type *dummy = 0;
1552
- this->priv_insert_ordered_at(element_count, last_position_it, false, &dummy[0], last_value_it);
1553
- }
2375
+ pointer back_ptr() const
2376
+ { return this->m_holder.start() + this->m_holder.m_size; }
1554
2377
 
1555
- //Absolutely experimental. This function might change, disappear or simply crash!
1556
- template<class BiDirPosConstIt, class BiDirSkipConstIt, class BiDirValueIt>
1557
- void insert_ordered_at(size_type element_count, BiDirPosConstIt last_position_it, BiDirSkipConstIt last_skip_it, BiDirValueIt last_value_it)
2378
+ size_type priv_index_of(pointer p) const
1558
2379
  {
1559
- this->priv_insert_ordered_at(element_count, last_position_it, true, last_skip_it, last_value_it);
2380
+ BOOST_ASSERT(this->m_holder.start() <= p);
2381
+ BOOST_ASSERT(p <= (this->m_holder.start()+this->size()));
2382
+ return static_cast<size_type>(p - this->m_holder.start());
1560
2383
  }
1561
2384
 
1562
- private:
1563
-
1564
- template<class OtherAllocator, class AllocVersion>
2385
+ template<class OtherAllocator>
1565
2386
  void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
1566
- , AllocVersion
1567
2387
  , typename container_detail::enable_if_c
1568
- < container_detail::is_same<AllocVersion, allocator_v0>::value &&
1569
- !container_detail::is_same<OtherAllocator, allocator_type>::value
1570
- >::type * = 0)
2388
+ < container_detail::is_version<OtherAllocator, 0>::value >::type * = 0)
1571
2389
  {
1572
- if(this->capacity() < x.size()){
2390
+ if(!container_detail::is_same<OtherAllocator, allocator_type>::value &&
2391
+ this->capacity() < x.size()){
1573
2392
  throw_bad_alloc();
1574
2393
  }
1575
- this->priv_move_assign_impl(boost::move(x), AllocVersion());
1576
- }
1577
-
1578
- template<class OtherAllocator, class AllocVersion>
1579
- void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
1580
- , AllocVersion
1581
- , typename container_detail::enable_if_c
1582
- < !container_detail::is_same<AllocVersion, allocator_v0>::value ||
1583
- container_detail::is_same<OtherAllocator, allocator_type>::value
1584
- >::type * = 0)
1585
- {
1586
- this->priv_move_assign_impl(boost::move(x), AllocVersion());
1587
- }
1588
-
1589
- template<class OtherAllocator, class AllocVersion>
1590
- void priv_move_assign_impl(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
1591
- , AllocVersion
1592
- , typename container_detail::enable_if_c
1593
- < container_detail::is_same<AllocVersion, allocator_v0>::value
1594
- >::type * = 0)
1595
- {
1596
- T* const this_start = container_detail::to_raw_pointer(m_holder.start());
1597
- T* const other_start = container_detail::to_raw_pointer(x.m_holder.start());
2394
+ T* const this_start = this->priv_raw_begin();
2395
+ T* const other_start = x.priv_raw_begin();
1598
2396
  const size_type this_sz = m_holder.m_size;
1599
2397
  const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
1600
2398
  boost::container::move_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
1601
2399
  this->m_holder.m_size = other_sz;
1602
2400
  }
1603
2401
 
1604
- template<class OtherAllocator, class AllocVersion>
1605
- void priv_move_assign_impl(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
1606
- , AllocVersion
1607
- , typename container_detail::enable_if_c
1608
- < !container_detail::is_same<AllocVersion, allocator_v0>::value
2402
+ template<class OtherAllocator>
2403
+ void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
2404
+ , typename container_detail::disable_if_or
2405
+ < void
2406
+ , container_detail::is_version<OtherAllocator, 0>
2407
+ , container_detail::is_different<OtherAllocator, allocator_type>
1609
2408
  >::type * = 0)
1610
2409
  {
1611
- //for move constructor, no aliasing (&x != this) is assummed.
2410
+ //for move assignment, no aliasing (&x != this) is assummed.
2411
+ BOOST_ASSERT(this != &x);
1612
2412
  allocator_type &this_alloc = this->m_holder.alloc();
1613
2413
  allocator_type &x_alloc = x.m_holder.alloc();
1614
- //If allocators are equal we can just swap pointers
1615
- if(this_alloc == x_alloc){
2414
+ const bool propagate_alloc = allocator_traits_type::propagate_on_container_move_assignment::value;
2415
+
2416
+ const bool is_propagable_from_x = is_propagable_from(x_alloc, x.m_holder.start(), this_alloc, propagate_alloc);
2417
+ const bool is_propagable_from_t = is_propagable_from(this_alloc, m_holder.start(), x_alloc, propagate_alloc);
2418
+ const bool are_both_propagable = is_propagable_from_x && is_propagable_from_t;
2419
+
2420
+ //Resources can be transferred if both allocators are
2421
+ //going to be equal after this function (either propagated or already equal)
2422
+ if(are_both_propagable){
1616
2423
  //Destroy objects but retain memory in case x reuses it in the future
1617
2424
  this->clear();
1618
- this->m_holder.swap(x.m_holder);
1619
- //Move allocator if needed
1620
- container_detail::bool_<allocator_traits_type::
1621
- propagate_on_container_move_assignment::value> flag;
1622
- container_detail::move_alloc(this_alloc, x_alloc, flag);
2425
+ this->m_holder.swap_resources(x.m_holder);
2426
+ }
2427
+ else if(is_propagable_from_x){
2428
+ this->clear();
2429
+ this->m_holder.alloc().deallocate(this->m_holder.m_start, this->m_holder.m_capacity);
2430
+ this->m_holder.steal_resources(x.m_holder);
1623
2431
  }
1624
- //If unequal allocators, then do a one by one move
2432
+ //Else do a one by one move
1625
2433
  else{
1626
- //TO-DO: optimize this
1627
- this->assign( boost::make_move_iterator(container_detail::to_raw_pointer(x.m_holder.start()))
1628
- , boost::make_move_iterator(container_detail::to_raw_pointer(x.m_holder.start() + x.m_holder.m_size)));
2434
+ this->assign( boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.begin()))
2435
+ , boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.end() ))
2436
+ );
1629
2437
  }
2438
+ //Move allocator if needed
2439
+ container_detail::move_alloc(this_alloc, x_alloc, container_detail::bool_<propagate_alloc>());
1630
2440
  }
1631
2441
 
1632
- template<class AllocVersion>
1633
- void priv_copy_assign(const vector &x, AllocVersion
2442
+ template<class OtherAllocator>
2443
+ void priv_copy_assign(const vector<T, OtherAllocator> &x
1634
2444
  , typename container_detail::enable_if_c
1635
- < container_detail::is_same<AllocVersion, allocator_v0>::value
1636
- >::type * = 0)
2445
+ < container_detail::is_version<OtherAllocator, 0>::value >::type * = 0)
1637
2446
  {
1638
- T* const this_start = container_detail::to_raw_pointer(m_holder.start());
1639
- T* const other_start = container_detail::to_raw_pointer(x.m_holder.start());
2447
+ if(!container_detail::is_same<OtherAllocator, allocator_type>::value &&
2448
+ this->capacity() < x.size()){
2449
+ throw_bad_alloc();
2450
+ }
2451
+ T* const this_start = this->priv_raw_begin();
2452
+ T* const other_start = x.priv_raw_begin();
1640
2453
  const size_type this_sz = m_holder.m_size;
1641
2454
  const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
1642
2455
  boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
1643
2456
  this->m_holder.m_size = other_sz;
1644
2457
  }
1645
2458
 
1646
- template<class AllocVersion>
1647
- void priv_copy_assign(const vector &x, AllocVersion
1648
- , typename container_detail::enable_if_c
1649
- < !container_detail::is_same<AllocVersion, allocator_v0>::value
1650
- >::type * = 0)
2459
+ template<class OtherAllocator>
2460
+ typename container_detail::disable_if_or
2461
+ < void
2462
+ , container_detail::is_version<OtherAllocator, 0>
2463
+ , container_detail::is_different<OtherAllocator, allocator_type>
2464
+ >::type
2465
+ priv_copy_assign(const vector<T, OtherAllocator> &x)
1651
2466
  {
1652
2467
  allocator_type &this_alloc = this->m_holder.alloc();
1653
2468
  const allocator_type &x_alloc = x.m_holder.alloc();
@@ -1658,158 +2473,192 @@ class vector
1658
2473
  this->shrink_to_fit();
1659
2474
  }
1660
2475
  container_detail::assign_alloc(this_alloc, x_alloc, flag);
1661
- this->assign( container_detail::to_raw_pointer(x.m_holder.start())
1662
- , container_detail::to_raw_pointer(x.m_holder.start() + x.m_holder.m_size));
2476
+ this->assign( x.priv_raw_begin(), x.priv_raw_end() );
1663
2477
  }
1664
2478
 
1665
- void priv_reserve(size_type, allocator_v0)
2479
+ template<class Vector> //Template it to avoid it in explicit instantiations
2480
+ void priv_swap(Vector &x, container_detail::true_type) //version_0
2481
+ { this->m_holder.deep_swap(x.m_holder); }
2482
+
2483
+ template<class Vector> //Template it to avoid it in explicit instantiations
2484
+ void priv_swap(Vector &x, container_detail::false_type) //version_N
1666
2485
  {
1667
- throw_bad_alloc();
2486
+ const bool propagate_alloc = allocator_traits_type::propagate_on_container_swap::value;
2487
+ if(are_swap_propagable( this->get_stored_allocator(), this->m_holder.start()
2488
+ , x.get_stored_allocator(), x.m_holder.start(), propagate_alloc)){
2489
+ //Just swap internals
2490
+ this->m_holder.swap_resources(x.m_holder);
2491
+ }
2492
+ else{
2493
+ //Else swap element by element...
2494
+ bool const t_smaller = this->size() < x.size();
2495
+ vector &sml = t_smaller ? *this : x;
2496
+ vector &big = t_smaller ? x : *this;
2497
+
2498
+ size_type const common_elements = sml.size();
2499
+ for(size_type i = 0; i != common_elements; ++i){
2500
+ boost::adl_move_swap(sml[i], big[i]);
2501
+ }
2502
+ //... and move-insert the remaining range
2503
+ sml.insert( sml.cend()
2504
+ , boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.nth(common_elements)))
2505
+ , boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.end()))
2506
+ );
2507
+ //Destroy remaining elements
2508
+ big.erase(big.nth(common_elements), big.cend());
2509
+ }
2510
+ //And now swap the allocator
2511
+ container_detail::swap_alloc(this->m_holder.alloc(), x.m_holder.alloc(), container_detail::bool_<propagate_alloc>());
2512
+ }
2513
+
2514
+ void priv_reserve_no_capacity(size_type, version_0)
2515
+ { throw_bad_alloc(); }
2516
+
2517
+ container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
2518
+ {
2519
+ return container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
2520
+ (::boost::make_move_iterator((T *)0));
1668
2521
  }
1669
2522
 
1670
- void priv_reserve(size_type new_cap, allocator_v1)
2523
+ void priv_reserve_no_capacity(size_type new_cap, version_1)
1671
2524
  {
1672
2525
  //There is not enough memory, allocate a new buffer
1673
- pointer p = this->m_holder.allocate(new_cap);
1674
- //Backwards (and possibly forward) expansion
1675
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1676
- ++this->num_alloc;
1677
- #endif
1678
- T * const raw_beg = container_detail::to_raw_pointer(this->m_holder.start());
1679
- const size_type sz = m_holder.m_size;
1680
- ::boost::container::uninitialized_move_alloc_n_source
1681
- ( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(p) );
1682
- boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
1683
- this->m_holder.start(p);
1684
- this->m_holder.capacity(new_cap);
2526
+ //Pass the hint so that allocators can take advantage of this.
2527
+ pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start);
2528
+ //We will reuse insert code, so create a dummy input iterator
2529
+ this->priv_forward_range_insert_new_allocation
2530
+ ( container_detail::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy());
1685
2531
  }
1686
2532
 
1687
- void priv_reserve(size_type new_cap, allocator_v2)
2533
+ void priv_reserve_no_capacity(size_type new_cap, version_2)
1688
2534
  {
1689
2535
  //There is not enough memory, allocate a new
1690
2536
  //buffer or expand the old one.
1691
2537
  bool same_buffer_start;
1692
2538
  size_type real_cap = 0;
1693
- std::pair<pointer, bool> ret =
1694
- this->m_holder.allocation_command
1695
- (allocate_new | expand_fwd | expand_bwd,
1696
- new_cap, new_cap, real_cap, this->m_holder.start());
2539
+ pointer reuse = 0;
2540
+ pointer const ret(this->m_holder.allocation_command(allocate_new | expand_fwd | expand_bwd, new_cap, real_cap = new_cap, reuse));
1697
2541
 
1698
2542
  //Check for forward expansion
1699
- same_buffer_start = ret.second && this->m_holder.start() == ret.first;
2543
+ same_buffer_start = reuse && this->m_holder.start() == ret;
1700
2544
  if(same_buffer_start){
1701
2545
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1702
2546
  ++this->num_expand_fwd;
1703
2547
  #endif
1704
2548
  this->m_holder.capacity(real_cap);
1705
2549
  }
1706
- //If there is no forward expansion, move objects
1707
- else{
1708
- //Backwards (and possibly forward) expansion
1709
- if(ret.second){
1710
- //We will reuse insert code, so create a dummy input iterator
1711
- container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
1712
- proxy(this->m_holder.alloc(), ::boost::make_move_iterator((T *)0));
2550
+ else{ //If there is no forward expansion, move objects, we will reuse insertion code
2551
+ T * const new_mem = container_detail::to_raw_pointer(ret);
2552
+ T * const ins_pos = this->priv_raw_end();
2553
+ if(reuse){ //Backwards (and possibly forward) expansion
1713
2554
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1714
2555
  ++this->num_expand_bwd;
1715
2556
  #endif
1716
2557
  this->priv_forward_range_insert_expand_backwards
1717
- ( container_detail::to_raw_pointer(ret.first)
1718
- , real_cap
1719
- , container_detail::to_raw_pointer(this->m_holder.start())
1720
- , 0
1721
- , proxy);
2558
+ ( new_mem , real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
1722
2559
  }
1723
- //New buffer
1724
- else{
1725
- //Backwards (and possibly forward) expansion
2560
+ else{ //New buffer
1726
2561
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1727
2562
  ++this->num_alloc;
1728
2563
  #endif
1729
- T * const raw_beg = container_detail::to_raw_pointer(this->m_holder.start());
1730
- const size_type sz = m_holder.m_size;
1731
- ::boost::container::uninitialized_move_alloc_n_source
1732
- ( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(ret.first) );
1733
- boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
1734
- this->m_holder.start(ret.first);
1735
- this->m_holder.capacity(real_cap);
2564
+ this->priv_forward_range_insert_new_allocation
2565
+ ( new_mem, real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
1736
2566
  }
1737
2567
  }
1738
2568
  }
1739
2569
 
1740
- template<class Proxy>
1741
- void priv_uninitialized_fill(Proxy proxy, size_type n) const
2570
+ void priv_destroy_last(const bool moved = false) BOOST_NOEXCEPT_OR_NOTHROW
1742
2571
  {
1743
- //Copy first new elements in pos
1744
- proxy.uninitialized_copy_n_and_update
1745
- (container_detail::to_raw_pointer(this->m_holder.start()), n);
1746
- //m_holder.size was already initialized to n in vector_alloc_holder's constructor
2572
+ (void)moved;
2573
+ if(!(value_traits::trivial_dctr || (value_traits::trivial_dctr_after_move && moved))){
2574
+ value_type* const p = this->priv_raw_end() - 1;
2575
+ allocator_traits_type::destroy(this->get_stored_allocator(), p);
2576
+ }
2577
+ --this->m_holder.m_size;
1747
2578
  }
1748
2579
 
1749
- void priv_destroy(value_type* p) BOOST_CONTAINER_NOEXCEPT
2580
+ void priv_destroy_last_n(const size_type n) BOOST_NOEXCEPT_OR_NOTHROW
1750
2581
  {
1751
- if(!value_traits::trivial_dctr)
1752
- allocator_traits_type::destroy(this->get_stored_allocator(), p);
2582
+ BOOST_ASSERT(n <= this->m_holder.m_size);
2583
+ if(!value_traits::trivial_dctr){
2584
+ T* const destroy_pos = this->priv_raw_begin() + (this->m_holder.m_size-n);
2585
+ boost::container::destroy_alloc_n(this->get_stored_allocator(), destroy_pos, n);
2586
+ }
2587
+ this->m_holder.m_size -= n;
1753
2588
  }
1754
2589
 
1755
- void priv_destroy_last_n(size_type n) BOOST_CONTAINER_NOEXCEPT
2590
+ template<class InpIt>
2591
+ void priv_uninitialized_construct_at_end(InpIt first, InpIt last)
1756
2592
  {
1757
- T* const end_pos = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
1758
- boost::container::destroy_alloc_n(this->get_stored_allocator(), end_pos-n, n);
1759
- this->m_holder.m_size -= n;
2593
+ T* const old_end_pos = this->priv_raw_end();
2594
+ T* const new_end_pos = boost::container::uninitialized_copy_alloc(this->m_holder.alloc(), first, last, old_end_pos);
2595
+ this->m_holder.m_size += new_end_pos - old_end_pos;
1760
2596
  }
1761
2597
 
1762
- void priv_destroy_all() BOOST_CONTAINER_NOEXCEPT
2598
+ void priv_destroy_all() BOOST_NOEXCEPT_OR_NOTHROW
1763
2599
  {
1764
2600
  boost::container::destroy_alloc_n
1765
- (this->get_stored_allocator(), container_detail::to_raw_pointer(this->m_holder.start()), this->m_holder.m_size);
2601
+ (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
1766
2602
  this->m_holder.m_size = 0;
1767
2603
  }
1768
2604
 
1769
2605
  template<class U>
1770
2606
  iterator priv_insert(const const_iterator &p, BOOST_FWD_REF(U) x)
1771
2607
  {
2608
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
1772
2609
  return this->priv_forward_range_insert
1773
- ( vector_iterator_get_ptr(p), 1, container_detail::get_insert_value_proxy<T*>(this->m_holder.alloc()
1774
- , ::boost::forward<U>(x)), alloc_version());
2610
+ ( vector_iterator_get_ptr(p), 1, container_detail::get_insert_value_proxy<T*, Allocator>(::boost::forward<U>(x)));
1775
2611
  }
1776
2612
 
1777
- void priv_push_back(const T &x)
2613
+ container_detail::insert_copy_proxy<Allocator, T*> priv_single_insert_proxy(const T &x)
2614
+ { return container_detail::insert_copy_proxy<Allocator, T*> (x); }
2615
+
2616
+ container_detail::insert_move_proxy<Allocator, T*> priv_single_insert_proxy(BOOST_RV_REF(T) x)
2617
+ { return container_detail::insert_move_proxy<Allocator, T*> (x); }
2618
+
2619
+ template <class U>
2620
+ void priv_push_back(BOOST_FWD_REF(U) u)
1778
2621
  {
1779
- if (this->m_holder.m_size < this->m_holder.capacity()){
2622
+ if (BOOST_LIKELY(this->room_enough())){
1780
2623
  //There is more memory, just construct a new object at the end
1781
2624
  allocator_traits_type::construct
1782
- ( this->m_holder.alloc()
1783
- , container_detail::to_raw_pointer(this->m_holder.start() + this->m_holder.m_size)
1784
- , x );
2625
+ ( this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<U>(u) );
1785
2626
  ++this->m_holder.m_size;
1786
2627
  }
1787
2628
  else{
1788
- container_detail::insert_copy_proxy<Allocator, T*> proxy(this->m_holder.alloc(), x);
1789
- this->priv_forward_range_insert_no_capacity(vector_iterator_get_ptr(this->cend()), 1, proxy, alloc_version());
2629
+ this->priv_forward_range_insert_no_capacity
2630
+ ( this->back_ptr(), 1
2631
+ , this->priv_single_insert_proxy(::boost::forward<U>(u)), alloc_version());
1790
2632
  }
1791
2633
  }
1792
2634
 
1793
- void priv_push_back(BOOST_RV_REF(T) x)
2635
+ container_detail::insert_n_copies_proxy<Allocator, T*> priv_resize_proxy(const T &x)
2636
+ { return container_detail::insert_n_copies_proxy<Allocator, T*>(x); }
2637
+
2638
+ container_detail::insert_default_initialized_n_proxy<Allocator, T*> priv_resize_proxy(default_init_t)
2639
+ { return container_detail::insert_default_initialized_n_proxy<Allocator, T*>(); }
2640
+
2641
+ container_detail::insert_value_initialized_n_proxy<Allocator, T*> priv_resize_proxy(value_init_t)
2642
+ { return container_detail::insert_value_initialized_n_proxy<Allocator, T*>(); }
2643
+
2644
+ template <class U>
2645
+ void priv_resize(size_type new_size, const U& u)
1794
2646
  {
1795
- if (this->m_holder.m_size < this->m_holder.capacity()){
1796
- //There is more memory, just construct a new object at the end
1797
- allocator_traits_type::construct
1798
- ( this->m_holder.alloc()
1799
- , container_detail::to_raw_pointer(this->m_holder.start() + this->m_holder.m_size)
1800
- , ::boost::move(x) );
1801
- ++this->m_holder.m_size;
2647
+ const size_type sz = this->size();
2648
+ if (new_size < sz){
2649
+ //Destroy last elements
2650
+ this->priv_destroy_last_n(sz - new_size);
1802
2651
  }
1803
2652
  else{
1804
- container_detail::insert_move_proxy<Allocator, T*> proxy(this->m_holder.alloc(), x);
1805
- this->priv_forward_range_insert_no_capacity(vector_iterator_get_ptr(this->cend()), 1, proxy, alloc_version());
2653
+ const size_type n = new_size - this->size();
2654
+ this->priv_forward_range_insert_at_end(n, this->priv_resize_proxy(u), alloc_version());
1806
2655
  }
1807
2656
  }
1808
2657
 
1809
- void priv_shrink_to_fit(allocator_v0) BOOST_CONTAINER_NOEXCEPT
2658
+ void priv_shrink_to_fit(version_0) BOOST_NOEXCEPT_OR_NOTHROW
1810
2659
  {}
1811
2660
 
1812
- void priv_shrink_to_fit(allocator_v1)
2661
+ void priv_shrink_to_fit(version_1)
1813
2662
  {
1814
2663
  const size_type cp = this->m_holder.capacity();
1815
2664
  if(cp){
@@ -1821,25 +2670,21 @@ class vector
1821
2670
  }
1822
2671
  else if(sz < cp){
1823
2672
  //Allocate a new buffer.
1824
- pointer p = this->m_holder.allocate(sz);
2673
+ //Pass the hint so that allocators can take advantage of this.
2674
+ pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), sz, this->m_holder.m_start);
1825
2675
 
1826
2676
  //We will reuse insert code, so create a dummy input iterator
1827
- container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
1828
- proxy(this->m_holder.alloc(), ::boost::make_move_iterator((T *)0));
1829
2677
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1830
2678
  ++this->num_alloc;
1831
2679
  #endif
1832
2680
  this->priv_forward_range_insert_new_allocation
1833
- ( container_detail::to_raw_pointer(p)
1834
- , sz
1835
- , container_detail::to_raw_pointer(this->m_holder.start())
1836
- , 0
1837
- , proxy);
2681
+ ( container_detail::to_raw_pointer(p), sz
2682
+ , this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy());
1838
2683
  }
1839
2684
  }
1840
2685
  }
1841
2686
 
1842
- void priv_shrink_to_fit(allocator_v2) BOOST_CONTAINER_NOEXCEPT
2687
+ void priv_shrink_to_fit(version_2) BOOST_NOEXCEPT_OR_NOTHROW
1843
2688
  {
1844
2689
  const size_type cp = this->m_holder.capacity();
1845
2690
  if(cp){
@@ -1850,10 +2695,10 @@ class vector
1850
2695
  this->m_holder.m_capacity = 0;
1851
2696
  }
1852
2697
  else{
1853
- size_type received_size;
2698
+ size_type received_size = sz;
2699
+ pointer reuse(this->m_holder.start());
1854
2700
  if(this->m_holder.allocation_command
1855
- ( shrink_in_place | nothrow_allocation
1856
- , cp, sz, received_size, this->m_holder.start()).first){
2701
+ (shrink_in_place | nothrow_allocation, cp, received_size, reuse)){
1857
2702
  this->m_holder.capacity(received_size);
1858
2703
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1859
2704
  ++this->num_shrink;
@@ -1865,7 +2710,7 @@ class vector
1865
2710
 
1866
2711
  template <class InsertionProxy>
1867
2712
  iterator priv_forward_range_insert_no_capacity
1868
- (const pointer &pos, const size_type, const InsertionProxy , allocator_v0)
2713
+ (const pointer &pos, const size_type, const InsertionProxy , version_0)
1869
2714
  {
1870
2715
  throw_bad_alloc();
1871
2716
  return iterator(pos);
@@ -1873,14 +2718,16 @@ class vector
1873
2718
 
1874
2719
  template <class InsertionProxy>
1875
2720
  iterator priv_forward_range_insert_no_capacity
1876
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v1)
2721
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_1)
1877
2722
  {
1878
2723
  //Check if we have enough memory or try to expand current memory
1879
2724
  const size_type n_pos = pos - this->m_holder.start();
1880
2725
  T *const raw_pos = container_detail::to_raw_pointer(pos);
1881
2726
 
1882
2727
  const size_type new_cap = this->m_holder.next_capacity(n);
1883
- T * new_buf = container_detail::to_raw_pointer(this->m_holder.alloc().allocate(new_cap));
2728
+ //Pass the hint so that allocators can take advantage of this.
2729
+ T * const new_buf = container_detail::to_raw_pointer
2730
+ (allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start));
1884
2731
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1885
2732
  ++this->num_alloc;
1886
2733
  #endif
@@ -1889,26 +2736,25 @@ class vector
1889
2736
  return iterator(this->m_holder.start() + n_pos);
1890
2737
  }
1891
2738
 
1892
-
1893
2739
  template <class InsertionProxy>
1894
2740
  iterator priv_forward_range_insert_no_capacity
1895
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v2)
2741
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2)
1896
2742
  {
1897
2743
  //Check if we have enough memory or try to expand current memory
1898
2744
  T *const raw_pos = container_detail::to_raw_pointer(pos);
1899
- const size_type n_pos = raw_pos - container_detail::to_raw_pointer(this->m_holder.start());
2745
+ const size_type n_pos = raw_pos - this->priv_raw_begin();
1900
2746
 
1901
- size_type real_cap = 0;
1902
2747
  //There is not enough memory, allocate a new
1903
2748
  //buffer or expand the old one.
1904
- std::pair<pointer, bool> ret = (this->m_holder.allocation_command
1905
- (allocate_new | expand_fwd | expand_bwd,
1906
- this->m_holder.m_size + n, this->m_holder.next_capacity(n), real_cap, this->m_holder.start()));
2749
+ size_type real_cap = this->m_holder.next_capacity(n);
2750
+ pointer reuse(this->m_holder.start());
2751
+ pointer const ret (this->m_holder.allocation_command
2752
+ (allocate_new | expand_fwd | expand_bwd, this->m_holder.m_size + n, real_cap, reuse));
1907
2753
 
1908
2754
  //Buffer reallocated
1909
- if(ret.second){
2755
+ if(reuse){
1910
2756
  //Forward expansion, delay insertion
1911
- if(this->m_holder.start() == ret.first){
2757
+ if(this->m_holder.start() == ret){
1912
2758
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
1913
2759
  ++this->num_expand_fwd;
1914
2760
  #endif
@@ -1922,8 +2768,7 @@ class vector
1922
2768
  ++this->num_expand_bwd;
1923
2769
  #endif
1924
2770
  this->priv_forward_range_insert_expand_backwards
1925
- ( container_detail::to_raw_pointer(ret.first)
1926
- , real_cap, raw_pos, n, insert_range_proxy);
2771
+ (container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
1927
2772
  }
1928
2773
  }
1929
2774
  //New buffer
@@ -1932,8 +2777,7 @@ class vector
1932
2777
  ++this->num_alloc;
1933
2778
  #endif
1934
2779
  this->priv_forward_range_insert_new_allocation
1935
- ( container_detail::to_raw_pointer(ret.first)
1936
- , real_cap, raw_pos, n, insert_range_proxy);
2780
+ ( container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
1937
2781
  }
1938
2782
 
1939
2783
  return iterator(this->m_holder.start() + n_pos);
@@ -1941,44 +2785,9 @@ class vector
1941
2785
 
1942
2786
  template <class InsertionProxy>
1943
2787
  iterator priv_forward_range_insert
1944
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v0)
1945
- {
1946
- //Check if we have enough memory or try to expand current memory
1947
- const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
1948
-
1949
- if (n > remaining){
1950
- //This will trigger an error
1951
- throw_bad_alloc();
1952
- }
1953
- const size_type n_pos = pos - this->m_holder.start();
1954
- T *const raw_pos = container_detail::to_raw_pointer(pos);
1955
- this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
1956
- return iterator(this->m_holder.start() + n_pos);
1957
- }
1958
-
1959
- template <class InsertionProxy>
1960
- iterator priv_forward_range_insert
1961
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v1)
1962
- {
1963
- //Check if we have enough memory or try to expand current memory
1964
- const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
1965
- T *const raw_pos = container_detail::to_raw_pointer(pos);
1966
-
1967
- if (n <= remaining){
1968
- const size_type n_pos = raw_pos - container_detail::to_raw_pointer(this->m_holder.start());
1969
- this->priv_forward_range_insert_expand_forward
1970
- (raw_pos, n, insert_range_proxy);
1971
- return iterator(this->m_holder.start() + n_pos);
1972
- }
1973
- else{
1974
- return this->priv_forward_range_insert_no_capacity(pos, n, insert_range_proxy, alloc_version());
1975
- }
1976
- }
1977
-
1978
- template <class InsertionProxy>
1979
- iterator priv_forward_range_insert
1980
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v2)
2788
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy)
1981
2789
  {
2790
+ BOOST_ASSERT(this->m_holder.capacity() >= this->m_holder.m_size);
1982
2791
  //Check if we have enough memory or try to expand current memory
1983
2792
  const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
1984
2793
 
@@ -1989,7 +2798,7 @@ class vector
1989
2798
  else{
1990
2799
  //Expand forward
1991
2800
  T *const raw_pos = container_detail::to_raw_pointer(pos);
1992
- const size_type n_pos = raw_pos - container_detail::to_raw_pointer(this->m_holder.start());
2801
+ const size_type n_pos = raw_pos - this->priv_raw_begin();
1993
2802
  this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
1994
2803
  return iterator(this->m_holder.start() + n_pos);
1995
2804
  }
@@ -1997,7 +2806,7 @@ class vector
1997
2806
 
1998
2807
  template <class InsertionProxy>
1999
2808
  iterator priv_forward_range_insert_at_end
2000
- (const size_type n, const InsertionProxy insert_range_proxy, allocator_v0)
2809
+ (const size_type n, const InsertionProxy insert_range_proxy, version_0)
2001
2810
  {
2002
2811
  //Check if we have enough memory or try to expand current memory
2003
2812
  const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
@@ -2010,81 +2819,11 @@ class vector
2010
2819
  return this->end();
2011
2820
  }
2012
2821
 
2013
- template <class InsertionProxy>
2014
- iterator priv_forward_range_insert_at_end
2015
- (const size_type n, const InsertionProxy insert_range_proxy, allocator_v1)
2016
- {
2017
- return this->priv_forward_range_insert(vector_iterator_get_ptr(this->cend()), n, insert_range_proxy, allocator_v1());
2018
- }
2019
-
2020
- template <class InsertionProxy>
2822
+ template <class InsertionProxy, class AllocVersion>
2021
2823
  iterator priv_forward_range_insert_at_end
2022
- (const size_type n, const InsertionProxy insert_range_proxy, allocator_v2)
2023
- {
2024
- return this->priv_forward_range_insert(vector_iterator_get_ptr(this->cend()), n, insert_range_proxy, allocator_v2());
2025
- }
2026
-
2027
- //Absolutely experimental. This function might change, disappear or simply crash!
2028
- template<class BiDirPosConstIt, class BiDirSkipConstIt, class BiDirValueIt>
2029
- void priv_insert_ordered_at( size_type element_count, BiDirPosConstIt last_position_it
2030
- , bool do_skip, BiDirSkipConstIt last_skip_it, BiDirValueIt last_value_it)
2824
+ (const size_type n, const InsertionProxy insert_range_proxy, AllocVersion)
2031
2825
  {
2032
- const size_type old_size_pos = this->size();
2033
- this->reserve(old_size_pos + element_count);
2034
- T* const begin_ptr = container_detail::to_raw_pointer(this->m_holder.start());
2035
- size_type insertions_left = element_count;
2036
- size_type next_pos = old_size_pos;
2037
- size_type hole_size = element_count;
2038
-
2039
- //Exception rollback. If any copy throws before the hole is filled, values
2040
- //already inserted/copied at the end of the buffer will be destroyed.
2041
- typename value_traits::ArrayDestructor past_hole_values_destroyer
2042
- (begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
2043
- //Loop for each insertion backwards, first moving the elements after the insertion point,
2044
- //then inserting the element.
2045
- while(insertions_left){
2046
- if(do_skip){
2047
- size_type n = *(--last_skip_it);
2048
- std::advance(last_value_it, -difference_type(n));
2049
- }
2050
- const size_type pos = static_cast<size_type>(*(--last_position_it));
2051
- BOOST_ASSERT(pos <= old_size_pos);
2052
- //If needed shift the range after the insertion point and the previous insertion point.
2053
- //Function will take care if the shift crosses the size() boundary, using copy/move
2054
- //or uninitialized copy/move if necessary.
2055
- size_type new_hole_size = (pos != next_pos)
2056
- ? priv_insert_ordered_at_shift_range(pos, next_pos, this->size(), insertions_left)
2057
- : hole_size
2058
- ;
2059
- if(new_hole_size > 0){
2060
- //The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
2061
- past_hole_values_destroyer.increment_size_backwards(next_pos - pos);
2062
- //Insert the new value in the hole
2063
- allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, *(--last_value_it));
2064
- --new_hole_size;
2065
- if(new_hole_size == 0){
2066
- //Hole was just filled, disable exception rollback and change vector size
2067
- past_hole_values_destroyer.release();
2068
- this->m_holder.m_size += element_count;
2069
- }
2070
- else{
2071
- //The hole was reduced by the new insertion by one
2072
- past_hole_values_destroyer.increment_size_backwards(size_type(1u));
2073
- }
2074
- }
2075
- else{
2076
- if(hole_size){
2077
- //Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
2078
- past_hole_values_destroyer.release();
2079
- this->m_holder.m_size += element_count;
2080
- }
2081
- //Insert the new value in the already constructed range
2082
- begin_ptr[pos + insertions_left - 1] = *(--last_value_it);
2083
- }
2084
- --insertions_left;
2085
- hole_size = new_hole_size;
2086
- next_pos = pos;
2087
- }
2826
+ return this->priv_forward_range_insert(this->back_ptr(), n, insert_range_proxy);
2088
2827
  }
2089
2828
 
2090
2829
  //Takes the range pointed by [first_pos, last_pos) and shifts it to the right
@@ -2100,28 +2839,28 @@ class vector
2100
2839
  //
2101
2840
  //Old situation:
2102
2841
  // first_pos last_pos old_limit
2103
- // | | |
2842
+ // | | |
2104
2843
  // ____________V_______V__________________V_____________
2105
2844
  //| prefix | range | suffix |raw_mem ~
2106
2845
  //|____________|_______|__________________|_____________~
2107
2846
  //
2108
- //New situation in Case Allocator (hole_size == 0):
2847
+ //New situation in Case A (hole_size == 0):
2109
2848
  // range is moved through move assignments
2110
2849
  //
2111
2850
  // first_pos last_pos limit_pos
2112
- // | | |
2851
+ // | | |
2113
2852
  // ____________V_______V__________________V_____________
2114
2853
  //| prefix' | | | range |suffix'|raw_mem ~
2115
2854
  //|________________+______|___^___|_______|_____________~
2116
2855
  // | |
2117
- // |_>_>_>_>_>^
2856
+ // |_>_>_>_>_>^
2118
2857
  //
2119
2858
  //
2120
- //New situation in Case B (hole_size > 0):
2859
+ //New situation in Case B (hole_size >= 0):
2121
2860
  // range is moved through uninitialized moves
2122
2861
  //
2123
2862
  // first_pos last_pos limit_pos
2124
- // | | |
2863
+ // | | |
2125
2864
  // ____________V_______V__________________V________________
2126
2865
  //| prefix' | | | [hole] | range |
2127
2866
  //|_______________________________________|________|___^___|
@@ -2132,7 +2871,7 @@ class vector
2132
2871
  // range is moved through move assignments and uninitialized moves
2133
2872
  //
2134
2873
  // first_pos last_pos limit_pos
2135
- // | | |
2874
+ // | | |
2136
2875
  // ____________V_______V__________________V___
2137
2876
  //| prefix' | | | range |
2138
2877
  //|___________________________________|___^___|
@@ -2144,22 +2883,22 @@ class vector
2144
2883
  BOOST_ASSERT(first_pos <= last_pos);
2145
2884
  BOOST_ASSERT(last_pos <= limit_pos);
2146
2885
  //
2147
- T* const begin_ptr = container_detail::to_raw_pointer(this->m_holder.start());
2886
+ T* const begin_ptr = this->priv_raw_begin();
2148
2887
  T* const first_ptr = begin_ptr + first_pos;
2149
2888
  T* const last_ptr = begin_ptr + last_pos;
2150
2889
 
2151
2890
  size_type hole_size = 0;
2152
- //Case Allocator:
2891
+ //Case A:
2153
2892
  if((last_pos + shift_count) <= limit_pos){
2154
2893
  //All move assigned
2155
- boost::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
2894
+ boost::container::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
2156
2895
  }
2157
2896
  //Case B:
2158
2897
  else if((first_pos + shift_count) >= limit_pos){
2159
2898
  //All uninitialized_moved
2160
2899
  ::boost::container::uninitialized_move_alloc
2161
2900
  (this->m_holder.alloc(), first_ptr, last_ptr, first_ptr + shift_count);
2162
- hole_size = last_pos + shift_count - limit_pos;
2901
+ hole_size = first_pos + shift_count - limit_pos;
2163
2902
  }
2164
2903
  //Case C:
2165
2904
  else{
@@ -2168,17 +2907,23 @@ class vector
2168
2907
  T* const boundary_ptr = limit_ptr - shift_count;
2169
2908
  ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), boundary_ptr, last_ptr, limit_ptr);
2170
2909
  //The rest is move assigned
2171
- boost::move_backward(first_ptr, boundary_ptr, limit_ptr);
2910
+ boost::container::move_backward(first_ptr, boundary_ptr, limit_ptr);
2172
2911
  }
2173
2912
  return hole_size;
2174
2913
  }
2175
2914
 
2176
2915
  private:
2916
+ T *priv_raw_begin() const
2917
+ { return container_detail::to_raw_pointer(m_holder.start()); }
2918
+
2919
+ T* priv_raw_end() const
2920
+ { return this->priv_raw_begin() + this->m_holder.m_size; }
2921
+
2177
2922
  template <class InsertionProxy>
2178
2923
  void priv_forward_range_insert_at_end_expand_forward(const size_type n, InsertionProxy insert_range_proxy)
2179
2924
  {
2180
- T* const old_finish = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
2181
- insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n);
2925
+ T* const old_finish = this->priv_raw_end();
2926
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
2182
2927
  this->m_holder.m_size += n;
2183
2928
  }
2184
2929
 
@@ -2186,13 +2931,13 @@ class vector
2186
2931
  void priv_forward_range_insert_expand_forward(T* const pos, const size_type n, InsertionProxy insert_range_proxy)
2187
2932
  {
2188
2933
  //n can't be 0, because there is nothing to do in that case
2189
- if(!n) return;
2934
+ if(BOOST_UNLIKELY(!n)) return;
2190
2935
  //There is enough memory
2191
- T* const old_finish = container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size;
2936
+ T* const old_finish = this->priv_raw_end();
2192
2937
  const size_type elems_after = old_finish - pos;
2193
2938
 
2194
2939
  if (!elems_after){
2195
- insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n);
2940
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
2196
2941
  this->m_holder.m_size += n;
2197
2942
  }
2198
2943
  else if (elems_after >= n){
@@ -2202,9 +2947,9 @@ class vector
2202
2947
  (this->m_holder.alloc(), old_finish - n, old_finish, old_finish);
2203
2948
  this->m_holder.m_size += n;
2204
2949
  //Copy previous to last objects to the initialized end
2205
- boost::move_backward(pos, old_finish - n, old_finish);
2950
+ boost::container::move_backward(pos, old_finish - n, old_finish);
2206
2951
  //Insert new objects in the pos
2207
- insert_range_proxy.copy_n_and_update(pos, n);
2952
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n);
2208
2953
  }
2209
2954
  else {
2210
2955
  //The new elements don't fit in the [pos, end()) range.
@@ -2213,9 +2958,9 @@ class vector
2213
2958
  ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pos, old_finish, pos + n);
2214
2959
  BOOST_TRY{
2215
2960
  //Copy first new elements in pos (gap is still there)
2216
- insert_range_proxy.copy_n_and_update(pos, elems_after);
2961
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elems_after);
2217
2962
  //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
2218
- insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n - elems_after);
2963
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n - elems_after);
2219
2964
  this->m_holder.m_size += n;
2220
2965
  }
2221
2966
  BOOST_CATCH(...){
@@ -2234,21 +2979,22 @@ class vector
2234
2979
  T *new_finish = new_start;
2235
2980
  T *old_finish;
2236
2981
  //Anti-exception rollbacks
2237
- typename value_traits::ArrayDeallocator scoped_alloc(new_start, this->m_holder.alloc(), new_cap);
2238
- typename value_traits::ArrayDestructor constructed_values_destroyer(new_start, this->m_holder.alloc(), 0u);
2982
+ typename value_traits::ArrayDeallocator new_buffer_deallocator(new_start, this->m_holder.alloc(), new_cap);
2983
+ typename value_traits::ArrayDestructor new_values_destroyer(new_start, this->m_holder.alloc(), 0u);
2239
2984
 
2240
2985
  //Initialize with [begin(), pos) old buffer
2241
2986
  //the start of the new buffer
2242
- T *old_buffer = container_detail::to_raw_pointer(this->m_holder.start());
2987
+ T * const old_buffer = this->priv_raw_begin();
2243
2988
  if(old_buffer){
2244
2989
  new_finish = ::boost::container::uninitialized_move_alloc
2245
- (this->m_holder.alloc(), container_detail::to_raw_pointer(this->m_holder.start()), pos, old_finish = new_finish);
2246
- constructed_values_destroyer.increment_size(new_finish - old_finish);
2990
+ (this->m_holder.alloc(), this->priv_raw_begin(), pos, old_finish = new_finish);
2991
+ new_values_destroyer.increment_size(new_finish - old_finish);
2247
2992
  }
2248
2993
  //Initialize new objects, starting from previous point
2249
- insert_range_proxy.uninitialized_copy_n_and_update(old_finish = new_finish, n);
2994
+ old_finish = new_finish;
2995
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
2250
2996
  new_finish += n;
2251
- constructed_values_destroyer.increment_size(new_finish - old_finish);
2997
+ new_values_destroyer.increment_size(new_finish - old_finish);
2252
2998
  //Initialize from the rest of the old buffer,
2253
2999
  //starting from previous point
2254
3000
  if(old_buffer){
@@ -2264,8 +3010,8 @@ class vector
2264
3010
  this->m_holder.m_size = new_finish - new_start;
2265
3011
  this->m_holder.capacity(new_cap);
2266
3012
  //All construction successful, disable rollbacks
2267
- constructed_values_destroyer.release();
2268
- scoped_alloc.release();
3013
+ new_values_destroyer.release();
3014
+ new_buffer_deallocator.release();
2269
3015
  }
2270
3016
 
2271
3017
  template <class InsertionProxy>
@@ -2275,9 +3021,9 @@ class vector
2275
3021
  {
2276
3022
  //n can be zero to just expand capacity
2277
3023
  //Backup old data
2278
- T* const old_start = container_detail::to_raw_pointer(this->m_holder.start());
2279
- T* const old_finish = old_start + this->m_holder.m_size;
3024
+ T* const old_start = this->priv_raw_begin();
2280
3025
  const size_type old_size = this->m_holder.m_size;
3026
+ T* const old_finish = old_start + old_size;
2281
3027
 
2282
3028
  //We can have 8 possibilities:
2283
3029
  const size_type elemsbefore = static_cast<size_type>(pos - old_start);
@@ -2291,17 +3037,18 @@ class vector
2291
3037
 
2292
3038
  //If anything goes wrong, this object will destroy
2293
3039
  //all the old objects to fulfill previous vector state
2294
- typename value_traits::OldArrayDestructor old_values_destroyer(old_start, this->m_holder.alloc(), old_size);
3040
+ typename value_traits::ArrayDestructor old_values_destroyer(old_start, this->m_holder.alloc(), old_size);
2295
3041
  //Check if s_before is big enough to hold the beginning of old data + new data
2296
3042
  if(s_before >= before_plus_new){
2297
3043
  //Copy first old values before pos, after that the new objects
2298
- T *const new_elem_pos = ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), old_start, pos, new_start);
3044
+ T *const new_elem_pos =
3045
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), old_start, pos, new_start);
2299
3046
  this->m_holder.m_size = elemsbefore;
2300
- insert_range_proxy.uninitialized_copy_n_and_update(new_elem_pos, n);
2301
- this->m_holder.m_size += n;
3047
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_elem_pos, n);
3048
+ this->m_holder.m_size = before_plus_new;
3049
+ const size_type new_size = old_size + n;
2302
3050
  //Check if s_before is so big that even copying the old data + new data
2303
3051
  //there is a gap between the new data and the old data
2304
- const size_type new_size = old_size + n;
2305
3052
  if(s_before >= new_size){
2306
3053
  //Old situation:
2307
3054
  // _________________________________________________________
@@ -2314,10 +3061,12 @@ class vector
2314
3061
  //|___________|__________|_________|________________________|
2315
3062
  //
2316
3063
  //Now initialize the rest of memory with the last old values
2317
- ::boost::container::uninitialized_move_alloc
2318
- (this->m_holder.alloc(), pos, old_finish, new_start + before_plus_new);
2319
- //All new elements correctly constructed, avoid new element destruction
2320
- this->m_holder.m_size = new_size;
3064
+ if(before_plus_new != new_size){ //Special case to avoid operations in back insertion
3065
+ ::boost::container::uninitialized_move_alloc
3066
+ (this->m_holder.alloc(), pos, old_finish, new_start + before_plus_new);
3067
+ //All new elements correctly constructed, avoid new element destruction
3068
+ this->m_holder.m_size = new_size;
3069
+ }
2321
3070
  //Old values destroyed automatically with "old_values_destroyer"
2322
3071
  //when "old_values_destroyer" goes out of scope unless the have trivial
2323
3072
  //destructor after move.
@@ -2339,22 +3088,28 @@ class vector
2339
3088
  //Now initialize the rest of memory with the last old values
2340
3089
  //All new elements correctly constructed, avoid new element destruction
2341
3090
  const size_type raw_gap = s_before - before_plus_new;
2342
- //Now initialize the rest of s_before memory with the
2343
- //first of elements after new values
2344
- ::boost::container::uninitialized_move_alloc_n
2345
- (this->m_holder.alloc(), pos, raw_gap, new_start + before_plus_new);
2346
- //Update size since we have a contiguous buffer
2347
- this->m_holder.m_size = old_size + s_before;
2348
- //All new elements correctly constructed, avoid old element destruction
2349
- old_values_destroyer.release();
2350
- //Now copy remaining last objects in the old buffer begin
2351
- T * const to_destroy = ::boost::move(pos + raw_gap, old_finish, old_start);
2352
- //Now destroy redundant elements except if they were moved and
2353
- //they have trivial destructor after move
2354
- size_type n_destroy = old_finish - to_destroy;
2355
- if(!value_traits::trivial_dctr_after_move)
2356
- boost::container::destroy_alloc_n(this->get_stored_allocator(), to_destroy, n_destroy);
2357
- this->m_holder.m_size -= n_destroy;
3091
+ if(!value_traits::trivial_dctr){
3092
+ //Now initialize the rest of s_before memory with the
3093
+ //first of elements after new values
3094
+ ::boost::container::uninitialized_move_alloc_n
3095
+ (this->m_holder.alloc(), pos, raw_gap, new_start + before_plus_new);
3096
+ //Now we have a contiguous buffer so program trailing element destruction
3097
+ //and update size to the final size.
3098
+ old_values_destroyer.shrink_forward(new_size-s_before);
3099
+ this->m_holder.m_size = new_size;
3100
+ //Now move remaining last objects in the old buffer begin
3101
+ ::boost::container::move(pos + raw_gap, old_finish, old_start);
3102
+ //Once moved, avoid calling the destructors if trivial after move
3103
+ if(value_traits::trivial_dctr_after_move){
3104
+ old_values_destroyer.release();
3105
+ }
3106
+ }
3107
+ else{ //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
3108
+ ::boost::container::uninitialized_move_alloc_n
3109
+ (this->m_holder.alloc(), pos, old_finish - pos, new_start + before_plus_new);
3110
+ this->m_holder.m_size = new_size;
3111
+ old_values_destroyer.release();
3112
+ }
2358
3113
  }
2359
3114
  }
2360
3115
  else{
@@ -2409,26 +3164,32 @@ class vector
2409
3164
  ::boost::container::uninitialized_move_alloc_n
2410
3165
  (this->m_holder.alloc(), old_start, s_before, new_start);
2411
3166
  //The buffer is all constructed until old_end,
2412
- //release destroyer and update size
2413
- old_values_destroyer.release();
2414
- this->m_holder.m_size = old_size + s_before;
2415
- //Now copy the second part of old_begin overwriting itself
2416
- T *const next = ::boost::move(old_start + s_before, pos, old_start);
3167
+ //so program trailing destruction and assign final size
3168
+ //if !do_after, s_before+n otherwise.
3169
+ size_type new_1st_range;
2417
3170
  if(do_after){
2418
- //Now copy the new_beg elements
2419
- insert_range_proxy.copy_n_and_update(next, s_before);
3171
+ new_1st_range = s_before;
3172
+ //release destroyer and update size
3173
+ old_values_destroyer.release();
2420
3174
  }
2421
3175
  else{
2422
- //Now copy the all the new elements
2423
- insert_range_proxy.copy_n_and_update(next, n);
3176
+ new_1st_range = n;
3177
+ if(value_traits::trivial_dctr_after_move)
3178
+ old_values_destroyer.release();
3179
+ else{
3180
+ old_values_destroyer.shrink_forward(old_size - (s_before - n));
3181
+ }
3182
+ }
3183
+ this->m_holder.m_size = old_size + new_1st_range;
3184
+ //Now copy the second part of old_begin overwriting itself
3185
+ T *const next = ::boost::container::move(old_start + s_before, pos, old_start);
3186
+ //Now copy the new_beg elements
3187
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), next, new_1st_range);
3188
+
3189
+ //If there is no after work and the last old part needs to be moved to front, do it
3190
+ if(!do_after && (n != s_before)){
2424
3191
  //Now displace old_end elements
2425
- T* const move_end = ::boost::move(pos, old_finish, next + n);
2426
- //Destroy remaining moved elements from old_end except if
2427
- //they have trivial destructor after being moved
2428
- const size_type n_destroy = s_before - n;
2429
- if(!value_traits::trivial_dctr_after_move)
2430
- boost::container::destroy_alloc_n(this->get_stored_allocator(), move_end, n_destroy);
2431
- this->m_holder.m_size -= n_destroy;
3192
+ ::boost::container::move(pos, old_finish, next + new_1st_range);
2432
3193
  }
2433
3194
  }
2434
3195
  else {
@@ -2462,7 +3223,7 @@ class vector
2462
3223
  (this->m_holder.alloc(), old_start, pos, new_start);
2463
3224
  this->m_holder.m_size = elemsbefore;
2464
3225
  const size_type mid_n = s_before - elemsbefore;
2465
- insert_range_proxy.uninitialized_copy_n_and_update(new_pos, mid_n);
3226
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_pos, mid_n);
2466
3227
  //The buffer is all constructed until old_end,
2467
3228
  //release destroyer
2468
3229
  this->m_holder.m_size = old_size + s_before;
@@ -2470,15 +3231,15 @@ class vector
2470
3231
 
2471
3232
  if(do_after){
2472
3233
  //Copy new_beg part
2473
- insert_range_proxy.copy_n_and_update(old_start, elemsbefore);
3234
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, elemsbefore);
2474
3235
  }
2475
3236
  else{
2476
3237
  //Copy all new elements
2477
3238
  const size_type rest_new = n - mid_n;
2478
- insert_range_proxy.copy_n_and_update(old_start, rest_new);
2479
- T* move_start = old_start + rest_new;
3239
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, rest_new);
3240
+ T* const move_start = old_start + rest_new;
2480
3241
  //Displace old_end
2481
- T* move_end = ::boost::move(pos, old_finish, move_start);
3242
+ T* const move_end = ::boost::container::move(pos, old_finish, move_start);
2482
3243
  //Destroy remaining moved elements from old_end except if they
2483
3244
  //have trivial destructor after being moved
2484
3245
  size_type n_destroy = s_before - n;
@@ -2530,10 +3291,10 @@ class vector
2530
3291
  (this->m_holder.alloc(), finish_n, old_finish, old_finish);
2531
3292
  this->m_holder.m_size += n_after;
2532
3293
  //Displace the rest of old_end to the new position
2533
- boost::move_backward(pos, finish_n, old_finish);
3294
+ boost::container::move_backward(pos, finish_n, old_finish);
2534
3295
  //Now overwrite with new_end
2535
3296
  //The new_end part is [first + (n - n_after), last)
2536
- insert_range_proxy.copy_n_and_update(pos, n_after);
3297
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n_after);
2537
3298
  }
2538
3299
  else {
2539
3300
  //The raw_mem from end will divide new_end part
@@ -2556,36 +3317,21 @@ class vector
2556
3317
  ::boost::container::uninitialized_move_alloc
2557
3318
  (this->m_holder.alloc(), pos, old_finish, old_finish + mid_last_dist);
2558
3319
 
2559
- BOOST_TRY{
2560
- //Copy the first part to the already constructed old_end zone
2561
- insert_range_proxy.copy_n_and_update(pos, elemsafter);
2562
- //Copy the rest to the uninitialized zone filling the gap
2563
- insert_range_proxy.uninitialized_copy_n_and_update(old_finish, mid_last_dist);
2564
- this->m_holder.m_size += n_after;
2565
- }
2566
- BOOST_CATCH(...){
2567
- boost::container::destroy_alloc_n(this->get_stored_allocator(), pos, mid_last_dist);
2568
- BOOST_RETHROW
2569
- }
2570
- BOOST_CATCH_END
2571
- /*
2572
- size_type mid_last_dist = n_after - elemsafter;
2573
- //First initialize data in raw memory
3320
+ typename value_traits::ArrayDestructor old_end_destroyer
3321
+ (old_finish + mid_last_dist, this->m_holder.alloc(), old_finish - pos);
2574
3322
 
2575
- //The new_end part is [first + (n - n_after), last)
2576
- insert_range_proxy.uninitialized_copy_last_and_update(old_finish, elemsafter);
2577
- this->m_holder.m_size += mid_last_dist;
2578
- ::boost::container::uninitialized_move_alloc
2579
- (this->m_holder.alloc(), pos, old_finish, old_finish + mid_last_dist);
2580
- this->m_holder.m_size += n_after - mid_last_dist;
2581
- //Now copy the part of new_end over constructed elements
2582
- insert_range_proxy.copy_remaining_to(pos);*/
3323
+ //Copy the first part to the already constructed old_end zone
3324
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elemsafter);
3325
+ //Copy the rest to the uninitialized zone filling the gap
3326
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, mid_last_dist);
3327
+ this->m_holder.m_size += n_after;
3328
+ old_end_destroyer.release();
2583
3329
  }
2584
3330
  }
2585
3331
  }
2586
3332
  }
2587
3333
 
2588
- void priv_check_range(size_type n) const
3334
+ void priv_throw_if_out_of_range(size_type n) const
2589
3335
  {
2590
3336
  //If n is out of range, throw an out_of_range exception
2591
3337
  if (n >= this->size()){
@@ -2593,6 +3339,16 @@ class vector
2593
3339
  }
2594
3340
  }
2595
3341
 
3342
+ bool priv_in_range(const_iterator pos) const
3343
+ {
3344
+ return (this->begin() <= pos) && (pos < this->end());
3345
+ }
3346
+
3347
+ bool priv_in_range_or_end(const_iterator pos) const
3348
+ {
3349
+ return (this->begin() <= pos) && (pos <= this->end());
3350
+ }
3351
+
2596
3352
  #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
2597
3353
  public:
2598
3354
  unsigned int num_expand_fwd;
@@ -2602,70 +3358,29 @@ class vector
2602
3358
  void reset_alloc_stats()
2603
3359
  { num_expand_fwd = num_expand_bwd = num_alloc = 0, num_shrink = 0; }
2604
3360
  #endif
2605
- /// @endcond
3361
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2606
3362
  };
2607
3363
 
2608
- template <class T, class Allocator>
2609
- inline bool
2610
- operator==(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
2611
- {
2612
- //Check first size and each element if needed
2613
- return x.size() == y.size() && std::equal(x.begin(), x.end(), y.begin());
2614
- }
2615
-
2616
- template <class T, class Allocator>
2617
- inline bool
2618
- operator!=(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
2619
- {
2620
- //Check first size and each element if needed
2621
- return x.size() != y.size() || !std::equal(x.begin(), x.end(), y.begin());
2622
- }
2623
-
2624
- template <class T, class Allocator>
2625
- inline bool
2626
- operator<(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
2627
- {
2628
- return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
2629
- }
2630
-
2631
- template <class T, class Allocator>
2632
- inline void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
2633
- { x.swap(y); }
2634
-
2635
- }}
3364
+ }} //namespace boost::container
2636
3365
 
2637
- /// @cond
3366
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2638
3367
 
2639
3368
  namespace boost {
2640
3369
 
2641
-
2642
3370
  //!has_trivial_destructor_after_move<> == true_type
2643
3371
  //!specialization for optimizations
2644
3372
  template <class T, class Allocator>
2645
3373
  struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
2646
- : public ::boost::has_trivial_destructor_after_move<Allocator>
2647
- {};
2648
-
3374
+ {
3375
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
3376
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
3377
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
3378
+ };
2649
3379
 
2650
3380
  }
2651
3381
 
2652
- //#define BOOST_CONTAINER_PUT_SWAP_OVERLOAD_IN_NAMESPACE_STD
2653
-
2654
- #ifdef BOOST_CONTAINER_PUT_SWAP_OVERLOAD_IN_NAMESPACE_STD
2655
-
2656
- namespace std {
2657
-
2658
- template <class T, class Allocator>
2659
- inline void swap(boost::container::vector<T, Allocator>& x, boost::container::vector<T, Allocator>& y)
2660
- { x.swap(y); }
2661
-
2662
- } //namespace std {
2663
-
2664
- #endif
2665
-
2666
- /// @endcond
3382
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
2667
3383
 
2668
3384
  #include <boost/container/detail/config_end.hpp>
2669
3385
 
2670
3386
  #endif // #ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
2671
-