passenger 5.1.4 → 5.1.5

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

Potentially problematic release.


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

Files changed (542) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +9 -0
  3. data/CHANGELOG +9 -0
  4. data/build/cxx_tests.rb +11 -1
  5. data/build/documentation.rb +0 -32
  6. data/build/support/cxx_dependency_map.rb +602 -2
  7. data/build/test_basics.rb +3 -3
  8. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +48 -0
  9. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +33 -0
  10. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +25 -0
  11. data/dev/ci/README.md +121 -0
  12. data/dev/ci/lib/functions.sh +129 -0
  13. data/dev/ci/lib/set-container-envvars.sh +46 -0
  14. data/dev/ci/lib/setup-container.sh +43 -0
  15. data/dev/ci/run-tests-natively +24 -0
  16. data/dev/ci/run-tests-with-docker +42 -0
  17. data/dev/ci/scripts/debug-console-wrapper.sh +27 -0
  18. data/dev/ci/scripts/docker-entrypoint-stage2.sh +17 -0
  19. data/dev/ci/scripts/docker-entrypoint.sh +17 -0
  20. data/dev/ci/scripts/inituidgid +17 -0
  21. data/dev/ci/scripts/run-tests-natively-stage2.sh +17 -0
  22. data/dev/ci/scripts/setup-host-natively.sh +11 -0
  23. data/dev/ci/setup-host +50 -0
  24. data/dev/ci/tests/apache2/run +6 -0
  25. data/dev/ci/tests/apache2/setup +4 -0
  26. data/dev/ci/tests/cxx/run +9 -0
  27. data/dev/ci/tests/cxx/setup +4 -0
  28. data/dev/ci/tests/nginx-dynamic/run +20 -0
  29. data/dev/ci/tests/nginx-dynamic/setup +4 -0
  30. data/dev/ci/tests/nginx/run +5 -0
  31. data/dev/ci/tests/nginx/setup +4 -0
  32. data/dev/ci/tests/nodejs/run +4 -0
  33. data/dev/ci/tests/nodejs/setup +4 -0
  34. data/dev/ci/tests/ruby/run +4 -0
  35. data/dev/ci/tests/ruby/setup +4 -0
  36. data/dev/ci/tests/source-packaging/run +4 -0
  37. data/dev/ci/tests/source-packaging/setup +4 -0
  38. data/dev/ci/tests/standalone/run +4 -0
  39. data/dev/ci/tests/standalone/setup +4 -0
  40. data/dev/copy_boost_headers +8 -2
  41. data/src/agent/Core/ApiServer.h +11 -5
  42. data/src/agent/Core/Controller.h +12 -46
  43. data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
  44. data/src/agent/Core/Controller/Config.h +369 -0
  45. data/src/agent/Core/Controller/ForwardResponse.cpp +4 -4
  46. data/src/agent/Core/Controller/Hooks.cpp +15 -3
  47. data/src/agent/Core/Controller/Implementation.cpp +1 -1
  48. data/src/agent/Core/Controller/InitRequest.cpp +28 -39
  49. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +25 -60
  50. data/src/agent/Core/Controller/InternalUtils.cpp +0 -16
  51. data/src/agent/Core/Controller/Miscellaneous.cpp +0 -17
  52. data/src/agent/Core/Controller/Request.h +2 -0
  53. data/src/agent/Core/Controller/SendRequest.cpp +4 -4
  54. data/src/agent/Core/Controller/{StateInspectionAndConfiguration.cpp → StateInspection.cpp} +0 -22
  55. data/src/agent/Core/Controller/TurboCaching.h +11 -10
  56. data/src/agent/Core/CoreMain.cpp +16 -6
  57. data/src/agent/Core/ResponseCache.h +3 -3
  58. data/src/agent/Core/SpawningKit/SmartSpawner.h +9 -3
  59. data/src/agent/Core/SpawningKit/Spawner.h +7 -3
  60. data/src/agent/UstRouter/ApiServer.h +3 -2
  61. data/src/agent/UstRouter/Controller.h +66 -32
  62. data/src/agent/UstRouter/UstRouterMain.cpp +10 -2
  63. data/src/agent/Watchdog/ApiServer.h +3 -2
  64. data/src/agent/Watchdog/WatchdogMain.cpp +3 -1
  65. data/src/apache2_module/ConfigurationCommands.cpp +1 -1
  66. data/src/cxx_supportlib/ConfigKit/Common.h +125 -0
  67. data/src/cxx_supportlib/ConfigKit/ConfigKit.h +34 -0
  68. data/src/cxx_supportlib/ConfigKit/README.md +895 -0
  69. data/src/cxx_supportlib/ConfigKit/Schema.h +331 -0
  70. data/src/cxx_supportlib/ConfigKit/Store.h +385 -0
  71. data/src/cxx_supportlib/ConfigKit/TableTranslator.h +185 -0
  72. data/src/cxx_supportlib/ConfigKit/Utils.h +141 -0
  73. data/src/cxx_supportlib/ConfigKit/VariantMapUtils.h +81 -0
  74. data/src/cxx_supportlib/Constants.h +1 -1
  75. data/src/cxx_supportlib/Crypto.cpp +2 -2
  76. data/src/cxx_supportlib/Logging.h +0 -35
  77. data/src/cxx_supportlib/ServerKit/HttpServer.h +35 -16
  78. data/src/cxx_supportlib/ServerKit/Server.h +65 -25
  79. data/src/cxx_supportlib/oxt/macros.hpp +3 -0
  80. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +0 -2
  81. data/src/cxx_supportlib/vendor-modified/boost/array.hpp +53 -42
  82. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +11 -5
  83. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +13 -2
  84. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +23 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +5 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +3 -2
  87. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +8 -1
  88. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +3 -1
  89. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +2 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +2 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +5 -0
  92. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +2 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +6 -4
  94. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +2 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +3 -1
  96. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +28 -17
  97. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +2 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +2 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +9 -4
  100. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +3 -3
  101. data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +10 -3
  102. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +90 -18
  103. data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +2 -2
  104. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
  105. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +8 -3
  106. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +2 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +35 -6
  108. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +2 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/comeau.hpp +1 -1
  110. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +2 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/compaq_cxx.hpp +1 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +3 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +2 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +19 -4
  115. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +3 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/greenhills.hpp +1 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +3 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +29 -7
  119. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/kai.hpp +1 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +2 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +2 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +16 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +2 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +2 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sgi_mipspro.hpp +1 -1
  126. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +10 -1
  127. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +2 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +44 -16
  129. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
  130. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +1 -2
  131. data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +1 -1
  132. data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +21 -21
  133. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +42 -1
  134. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +7 -0
  135. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +40 -7
  136. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +39 -6
  137. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +7 -0
  138. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +7 -0
  139. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +7 -0
  140. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +8 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +7 -0
  142. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +7 -0
  143. data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +33 -4
  144. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +0 -2
  145. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +0 -3
  146. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -27
  147. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +62 -26
  148. data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +2 -2
  149. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +4 -4
  150. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +4 -4
  151. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +2 -0
  152. data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +39 -5
  153. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +49 -32
  154. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +175 -7
  155. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +223 -98
  156. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_sorted.hpp +57 -0
  157. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +88 -41
  158. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +7 -8
  159. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +4 -9
  160. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +45 -18
  161. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +205 -26
  162. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +290 -181
  163. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +2 -0
  164. data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +24 -19
  165. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +38 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +320 -46
  167. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +91 -18
  168. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -19
  169. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +491 -120
  170. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +4 -4
  171. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +0 -3
  172. data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +399 -0
  173. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +2 -0
  174. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +4 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +4 -0
  176. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +2 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +4 -0
  178. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +4 -0
  179. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +2 -0
  180. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +2 -0
  181. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +2 -0
  182. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +2 -0
  183. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +2 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +101 -20
  185. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +19 -14
  186. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +117 -59
  187. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -6
  188. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +33 -28
  189. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +414 -70
  190. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +1 -0
  191. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +2 -2
  192. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +134 -117
  193. data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +202 -99
  194. data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +8 -10
  195. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +217 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +29 -27
  197. data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +5 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +13 -13
  199. data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +3 -3
  200. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +2 -1
  201. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +4 -3
  202. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +6 -5
  203. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +2 -2
  204. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +8 -7
  205. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +2 -1
  206. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +2 -1
  207. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +4 -3
  208. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +3 -2
  209. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +2 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +4 -3
  211. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +27 -7
  212. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +5 -5
  213. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +5 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +4 -4
  215. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +4 -5
  216. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +2 -1
  217. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +5 -4
  218. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +4 -3
  219. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +3 -2
  220. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +2 -2
  222. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +5 -4
  223. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +6 -5
  224. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +4 -0
  225. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +2 -2
  226. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +5 -4
  227. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +2 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +3 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +13 -0
  230. data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +1 -0
  231. data/src/cxx_supportlib/vendor-modified/boost/detail/workaround.hpp +5 -0
  232. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +11 -0
  233. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/shared_ptr.hpp +17 -0
  234. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +25 -3
  235. data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +2 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +114 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +116 -142
  238. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +57 -69
  239. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +3 -3
  241. data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +27 -13
  242. data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +4 -2
  243. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +99 -12
  244. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +4 -2
  245. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +35 -4
  246. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +37 -6
  247. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +95 -8
  248. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +4 -2
  249. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +209 -72
  250. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +86 -20
  251. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +11 -11
  252. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +6 -6
  253. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +4 -1
  254. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +58 -45
  255. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +27 -26
  256. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +2 -2
  257. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +7 -7
  258. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +8 -3
  259. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +4 -3
  260. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +27 -26
  261. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +3 -1
  262. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +4 -2
  263. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +9 -7
  264. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +83 -57
  265. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +30 -30
  266. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +9 -8
  267. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +8 -7
  268. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -15
  269. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +70 -44
  270. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +22 -21
  271. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +7 -6
  272. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +5 -4
  273. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +29 -28
  274. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +33 -12
  275. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +19 -12
  276. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +21 -20
  277. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +4 -3
  278. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +3 -2
  279. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +23 -22
  280. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +23 -22
  281. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +10 -9
  282. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +103 -29
  283. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +15 -0
  284. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +295 -211
  285. data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +2 -2
  286. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +20 -7
  287. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +4 -2
  288. data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +5 -4
  289. data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +4 -4
  290. data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +3 -2
  291. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +4 -4
  292. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +4 -4
  293. data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +22 -4
  294. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +36 -4
  295. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +43 -13
  296. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +95 -8
  297. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +4 -2
  298. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +96 -12
  299. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +102 -5
  300. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +48 -4
  301. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +20 -11
  302. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +9 -2
  303. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +95 -8
  304. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +36 -4
  305. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +27 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +167 -23
  307. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +28 -0
  308. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +100 -46
  309. data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +5 -4
  310. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +37 -27
  311. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +30 -14
  312. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +35 -36
  314. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +6 -28
  315. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +20 -5
  316. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +4 -2
  317. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -1
  318. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +5 -0
  319. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +11 -7
  320. data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +1 -3
  321. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +5 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +11 -0
  323. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +10 -2
  324. data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +40 -7
  325. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +67 -0
  326. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +63 -0
  327. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +2437 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +121 -0
  329. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/insertion_sort.hpp +127 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +637 -0
  331. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +139 -0
  332. data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +155 -0
  333. data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +1 -116
  334. data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +14 -13
  335. data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +17 -1
  336. data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +2 -0
  337. data/src/cxx_supportlib/vendor-modified/boost/move/detail/destruct_n.hpp +67 -0
  338. data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +227 -32
  339. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +4 -0
  340. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +30 -9
  341. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +12 -0
  342. data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +84 -80
  343. data/src/cxx_supportlib/vendor-modified/boost/move/detail/placement_new.hpp +30 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/move/detail/reverse_iterator.hpp +171 -0
  345. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +14 -20
  346. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
  347. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +14 -0
  348. data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +32 -33
  349. data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +2 -1
  350. data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +49 -49
  351. data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +8 -7
  352. data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +17 -16
  353. data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +3 -0
  354. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +1 -1
  355. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +2 -3
  356. data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +197 -255
  357. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +1059 -0
  358. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +75 -0
  359. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +116 -0
  360. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +36 -0
  361. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +253 -0
  362. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +196 -0
  363. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +117 -0
  364. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +372 -554
  365. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +12 -1
  366. data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +15 -7
  367. data/src/cxx_supportlib/vendor-modified/boost/pool/pool_alloc.hpp +24 -0
  368. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +9 -2
  369. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +15 -1
  370. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +16 -4
  371. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +3 -3
  372. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +4 -4
  373. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +4 -4
  374. data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +1 -1
  375. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +2 -2
  376. data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +20 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/cat.hpp +1 -1
  378. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +6 -6
  379. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +5 -6
  380. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/to_list_msvc.hpp +55 -0
  381. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/to_list.hpp +12 -0
  382. data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +4 -4
  383. data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +0 -5
  384. data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +16 -16
  385. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +4 -4
  386. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +3 -0
  387. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +102 -87
  388. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +45 -21
  389. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +4 -4
  390. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +2 -2
  391. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +1 -1
  392. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +14 -2
  393. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +46 -0
  394. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +5 -2
  395. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +5 -14
  396. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +116 -13
  397. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +34 -0
  398. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +2 -2
  399. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +1 -1
  400. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +3 -3
  401. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +1 -0
  402. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +2 -2
  403. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1004 -159
  404. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +9 -0
  405. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +3 -0
  406. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +4 -58
  407. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +5 -2
  408. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +9 -0
  409. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -8
  410. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync.hpp +3 -3
  411. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +30 -0
  412. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +3 -0
  413. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +5 -4
  414. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +28 -3
  415. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +187 -0
  416. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +52 -144
  417. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +120 -450
  418. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +2 -1
  419. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +2 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +7 -6
  421. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +70 -8
  422. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +6 -5
  423. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +9 -8
  424. data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +3 -3
  425. data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +5 -4
  426. data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +0 -1
  427. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +0 -11
  428. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +6 -4
  429. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +11 -2
  430. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +11 -4
  431. data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +8 -8
  432. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +1 -1
  433. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +5 -5
  434. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +22 -18
  435. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +163 -55
  436. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +1 -0
  437. data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +1 -1
  438. data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +9 -9
  439. data/src/cxx_supportlib/vendor-modified/boost/thread/locks.hpp +1 -0
  440. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +6 -7
  441. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +17 -2
  442. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +2 -2
  443. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +5 -5
  444. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/timespec.hpp +29 -0
  445. data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +23 -18
  446. data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +6 -6
  447. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp +19 -4
  448. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_guard.hpp +3 -3
  449. data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +1 -1
  450. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +265 -0
  451. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +272 -0
  452. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +300 -0
  453. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +3 -3
  454. data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +6 -6
  455. data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +1 -0
  456. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +9 -3
  457. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +3 -3
  458. data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +1 -0
  459. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +2 -1
  460. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +2 -1
  461. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +1 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +2 -1
  463. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +1 -0
  464. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +1 -1
  465. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +1 -0
  466. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +1 -0
  467. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +1 -0
  468. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +1 -1
  469. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +1 -0
  470. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +2 -1
  471. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +21 -1
  472. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +1 -0
  473. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +1 -1
  474. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +2 -1
  475. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +1 -0
  476. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +1 -1
  477. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +1 -1
  478. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +2 -1
  479. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_void.hpp +52 -0
  480. data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +1 -0
  481. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +1 -1
  482. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +1 -1
  483. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +1 -1
  484. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +1 -1
  485. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +1 -1
  486. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +1 -1
  487. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +1 -1
  488. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +40 -6
  489. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +4986 -0
  490. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +107 -0
  491. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +105 -0
  492. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +1814 -1255
  493. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +41 -45
  494. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +1498 -1161
  495. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +40 -44
  496. data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +2 -2
  497. data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +7 -6
  498. data/src/cxx_supportlib/vendor-modified/boost/utility/compare_pointees.hpp +10 -2
  499. data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +39 -22
  500. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +690 -0
  501. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view_fwd.hpp +39 -0
  502. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  503. data/src/helper-scripts/crash-watch.rb +3 -0
  504. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  505. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -0
  506. data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -12
  507. metadata +77 -38
  508. data/dev/ci/inituidgid +0 -24
  509. data/dev/ci/run_jenkins.sh +0 -70
  510. data/dev/ci/run_travis.sh +0 -314
  511. data/doc/Design and Architecture.html +0 -2421
  512. data/doc/Design and Architecture.txt +0 -511
  513. data/doc/Security of user switching support.html +0 -1833
  514. data/doc/Users guide Apache.html +0 -3101
  515. data/doc/Users guide Apache.idmap.txt +0 -451
  516. data/doc/Users guide Apache.txt +0 -534
  517. data/doc/Users guide Nginx.html +0 -3026
  518. data/doc/Users guide Nginx.idmap.txt +0 -431
  519. data/doc/Users guide Nginx.txt +0 -451
  520. data/doc/Users guide Standalone.html +0 -2092
  521. data/doc/Users guide Standalone.idmap.txt +0 -137
  522. data/doc/Users guide Standalone.txt +0 -81
  523. data/doc/Users guide.html +0 -1606
  524. data/doc/Users guide.txt +0 -8
  525. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -20
  526. data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +0 -29
  527. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +0 -40
  528. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -22
  529. data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -29
  530. data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -383
  531. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +0 -318
  532. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +0 -67
  533. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +0 -60
  534. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +0 -214
  535. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +0 -34
  536. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +0 -1128
  537. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +0 -928
  538. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +0 -686
  539. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +0 -188
  540. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +0 -873
  541. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +0 -628
  542. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +0 -266
@@ -11,55 +11,51 @@
11
11
  #pragma once
12
12
  #endif
13
13
 
14
- #include <memory>
15
- #include <functional>
16
14
  #include <boost/functional/hash_fwd.hpp>
17
15
  #include <boost/unordered/detail/fwd.hpp>
16
+ #include <functional>
17
+ #include <memory>
18
18
 
19
- namespace boost
20
- {
21
- namespace unordered
22
- {
23
- template <class K,
24
- class T,
25
- class H = boost::hash<K>,
26
- class P = std::equal_to<K>,
27
- class A = std::allocator<std::pair<const K, T> > >
28
- class unordered_map;
29
-
30
- template <class K, class T, class H, class P, class A>
31
- inline bool operator==(unordered_map<K, T, H, P, A> const&,
32
- unordered_map<K, T, H, P, A> const&);
33
- template <class K, class T, class H, class P, class A>
34
- inline bool operator!=(unordered_map<K, T, H, P, A> const&,
35
- unordered_map<K, T, H, P, A> const&);
36
- template <class K, class T, class H, class P, class A>
37
- inline void swap(unordered_map<K, T, H, P, A>&,
38
- unordered_map<K, T, H, P, A>&);
39
-
40
- template <class K,
41
- class T,
42
- class H = boost::hash<K>,
43
- class P = std::equal_to<K>,
44
- class A = std::allocator<std::pair<const K, T> > >
45
- class unordered_multimap;
46
-
47
- template <class K, class T, class H, class P, class A>
48
- inline bool operator==(unordered_multimap<K, T, H, P, A> const&,
49
- unordered_multimap<K, T, H, P, A> const&);
50
- template <class K, class T, class H, class P, class A>
51
- inline bool operator!=(unordered_multimap<K, T, H, P, A> const&,
52
- unordered_multimap<K, T, H, P, A> const&);
53
- template <class K, class T, class H, class P, class A>
54
- inline void swap(unordered_multimap<K, T, H, P, A>&,
55
- unordered_multimap<K, T, H, P, A>&);
56
- }
19
+ namespace boost {
20
+ namespace unordered {
21
+ template <class K, class T, class H = boost::hash<K>,
22
+ class P = std::equal_to<K>,
23
+ class A = std::allocator<std::pair<const K, T> > >
24
+ class unordered_map;
25
+
26
+ template <class K, class T, class H, class P, class A>
27
+ inline bool operator==(
28
+ unordered_map<K, T, H, P, A> const&, unordered_map<K, T, H, P, A> const&);
29
+ template <class K, class T, class H, class P, class A>
30
+ inline bool operator!=(
31
+ unordered_map<K, T, H, P, A> const&, unordered_map<K, T, H, P, A> const&);
32
+ template <class K, class T, class H, class P, class A>
33
+ inline void swap(unordered_map<K, T, H, P, A>&, unordered_map<K, T, H, P, A>&);
34
+
35
+ template <class K, class T, class H = boost::hash<K>,
36
+ class P = std::equal_to<K>,
37
+ class A = std::allocator<std::pair<const K, T> > >
38
+ class unordered_multimap;
39
+
40
+ template <class K, class T, class H, class P, class A>
41
+ inline bool operator==(unordered_multimap<K, T, H, P, A> const&,
42
+ unordered_multimap<K, T, H, P, A> const&);
43
+ template <class K, class T, class H, class P, class A>
44
+ inline bool operator!=(unordered_multimap<K, T, H, P, A> const&,
45
+ unordered_multimap<K, T, H, P, A> const&);
46
+ template <class K, class T, class H, class P, class A>
47
+ inline void swap(
48
+ unordered_multimap<K, T, H, P, A>&, unordered_multimap<K, T, H, P, A>&);
49
+
50
+ template <class N, class K, class T, class A> class node_handle_map;
51
+ template <class N, class K, class T, class A> struct insert_return_type_map;
52
+ }
57
53
 
58
- using boost::unordered::unordered_map;
59
- using boost::unordered::unordered_multimap;
60
- using boost::unordered::swap;
61
- using boost::unordered::operator==;
62
- using boost::unordered::operator!=;
54
+ using boost::unordered::unordered_map;
55
+ using boost::unordered::unordered_multimap;
56
+ using boost::unordered::swap;
57
+ using boost::unordered::operator==;
58
+ using boost::unordered::operator!=;
63
59
  }
64
60
 
65
61
  #endif
@@ -14,12 +14,10 @@
14
14
  #pragma once
15
15
  #endif
16
16
 
17
- #include <boost/unordered/unordered_set_fwd.hpp>
18
- #include <boost/unordered/detail/equivalent.hpp>
19
- #include <boost/unordered/detail/unique.hpp>
20
- #include <boost/unordered/detail/util.hpp>
17
+ #include <boost/core/explicit_operator_bool.hpp>
21
18
  #include <boost/functional/hash.hpp>
22
19
  #include <boost/move/move.hpp>
20
+ #include <boost/unordered/detail/set.hpp>
23
21
 
24
22
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
25
23
  #include <initializer_list>
@@ -28,1522 +26,1861 @@
28
26
  #if defined(BOOST_MSVC)
29
27
  #pragma warning(push)
30
28
  #if BOOST_MSVC >= 1400
31
- #pragma warning(disable:4396) //the inline specifier cannot be used when a
32
- // friend declaration refers to a specialization
33
- // of a function template
29
+ #pragma warning(disable : 4396) // the inline specifier cannot be used when a
30
+ // friend declaration refers to a specialization
31
+ // of a function template
34
32
  #endif
35
33
  #endif
36
34
 
37
- namespace boost
35
+ namespace boost {
36
+ namespace unordered {
37
+ template <class T, class H, class P, class A> class unordered_set
38
38
  {
39
- namespace unordered
40
- {
41
- template <class T, class H, class P, class A>
42
- class unordered_set
43
- {
44
39
  #if defined(BOOST_UNORDERED_USE_MOVE)
45
- BOOST_COPYABLE_AND_MOVABLE(unordered_set)
40
+ BOOST_COPYABLE_AND_MOVABLE(unordered_set)
46
41
  #endif
47
- public:
42
+ template <typename, typename, typename, typename>
43
+ friend class unordered_multiset;
48
44
 
49
- typedef T key_type;
50
- typedef T value_type;
51
- typedef H hasher;
52
- typedef P key_equal;
53
- typedef A allocator_type;
45
+ public:
46
+ typedef T key_type;
47
+ typedef T value_type;
48
+ typedef H hasher;
49
+ typedef P key_equal;
50
+ typedef A allocator_type;
54
51
 
55
- private:
52
+ private:
53
+ typedef boost::unordered::detail::set<A, T, H, P> types;
54
+ typedef typename types::value_allocator_traits value_allocator_traits;
55
+ typedef typename types::table table;
56
56
 
57
- typedef boost::unordered::detail::set<A, T, H, P> types;
58
- typedef typename types::traits allocator_traits;
59
- typedef typename types::table table;
57
+ public:
58
+ typedef typename value_allocator_traits::pointer pointer;
59
+ typedef typename value_allocator_traits::const_pointer const_pointer;
60
60
 
61
- public:
61
+ typedef value_type& reference;
62
+ typedef value_type const& const_reference;
62
63
 
63
- typedef typename allocator_traits::pointer pointer;
64
- typedef typename allocator_traits::const_pointer const_pointer;
64
+ typedef std::size_t size_type;
65
+ typedef std::ptrdiff_t difference_type;
65
66
 
66
- typedef value_type& reference;
67
- typedef value_type const& const_reference;
67
+ typedef typename table::cl_iterator const_local_iterator;
68
+ typedef typename table::l_iterator local_iterator;
69
+ typedef typename table::c_iterator const_iterator;
70
+ typedef typename table::iterator iterator;
71
+ typedef typename types::node_type node_type;
72
+ typedef typename types::insert_return_type insert_return_type;
68
73
 
69
- typedef std::size_t size_type;
70
- typedef std::ptrdiff_t difference_type;
74
+ private:
75
+ table table_;
71
76
 
72
- typedef typename table::cl_iterator const_local_iterator;
73
- typedef typename table::cl_iterator local_iterator;
74
- typedef typename table::c_iterator const_iterator;
75
- typedef typename table::c_iterator iterator;
77
+ public:
78
+ // constructors
76
79
 
77
- private:
80
+ unordered_set();
78
81
 
79
- table table_;
82
+ explicit unordered_set(size_type, const hasher& = hasher(),
83
+ const key_equal& = key_equal(),
84
+ const allocator_type& = allocator_type());
80
85
 
81
- public:
86
+ explicit unordered_set(size_type, const allocator_type&);
82
87
 
83
- // constructors
88
+ explicit unordered_set(size_type, const hasher&, const allocator_type&);
84
89
 
85
- explicit unordered_set(
86
- size_type = boost::unordered::detail::default_bucket_count,
87
- const hasher& = hasher(),
88
- const key_equal& = key_equal(),
89
- const allocator_type& = allocator_type());
90
+ explicit unordered_set(allocator_type const&);
90
91
 
91
- explicit unordered_set(allocator_type const&);
92
+ template <class InputIt> unordered_set(InputIt, InputIt);
93
+
94
+ template <class InputIt>
95
+ unordered_set(InputIt, InputIt, size_type, const hasher& = hasher(),
96
+ const key_equal& = key_equal());
92
97
 
93
- template <class InputIt>
94
- unordered_set(InputIt, InputIt);
98
+ template <class InputIt>
99
+ unordered_set(InputIt, InputIt, size_type, const hasher&, const key_equal&,
100
+ const allocator_type&);
95
101
 
96
- template <class InputIt>
97
- unordered_set(
98
- InputIt, InputIt,
99
- size_type,
100
- const hasher& = hasher(),
101
- const key_equal& = key_equal());
102
+ template <class InputIt>
103
+ unordered_set(
104
+ InputIt, InputIt, size_type, const hasher&, const allocator_type&);
102
105
 
103
- template <class InputIt>
104
- unordered_set(
105
- InputIt, InputIt,
106
- size_type,
107
- const hasher&,
108
- const key_equal&,
109
- const allocator_type&);
106
+ template <class InputIt>
107
+ unordered_set(InputIt, InputIt, size_type, const allocator_type&);
110
108
 
111
- // copy/move constructors
109
+ // copy/move constructors
112
110
 
113
- unordered_set(unordered_set const&);
111
+ unordered_set(unordered_set const&);
114
112
 
115
- unordered_set(unordered_set const&, allocator_type const&);
113
+ unordered_set(unordered_set const&, allocator_type const&);
114
+ unordered_set(BOOST_RV_REF(unordered_set), allocator_type const&);
116
115
 
117
116
  #if defined(BOOST_UNORDERED_USE_MOVE)
118
- unordered_set(BOOST_RV_REF(unordered_set) other)
119
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
120
- : table_(other.table_, boost::unordered::detail::move_tag())
121
- {
122
- }
117
+ unordered_set(BOOST_RV_REF(unordered_set) other)
118
+ BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
119
+ : table_(other.table_, boost::unordered::detail::move_tag())
120
+ {
121
+ }
123
122
  #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
124
- unordered_set(unordered_set&& other)
125
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
126
- : table_(other.table_, boost::unordered::detail::move_tag())
127
- {
128
- }
129
- #endif
130
-
131
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
132
- unordered_set(unordered_set&&, allocator_type const&);
123
+ unordered_set(unordered_set&& other)
124
+ BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
125
+ : table_(other.table_, boost::unordered::detail::move_tag())
126
+ {
127
+ }
133
128
  #endif
134
129
 
135
130
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
136
- unordered_set(
137
- std::initializer_list<value_type>,
138
- size_type = boost::unordered::detail::default_bucket_count,
139
- const hasher& = hasher(),
140
- const key_equal&l = key_equal(),
141
- const allocator_type& = allocator_type());
131
+ unordered_set(std::initializer_list<value_type>,
132
+ size_type = boost::unordered::detail::default_bucket_count,
133
+ const hasher& = hasher(), const key_equal& l = key_equal(),
134
+ const allocator_type& = allocator_type());
135
+ unordered_set(std::initializer_list<value_type>, size_type, const hasher&,
136
+ const allocator_type&);
137
+ unordered_set(
138
+ std::initializer_list<value_type>, size_type, const allocator_type&);
142
139
  #endif
143
140
 
144
- // Destructor
141
+ // Destructor
145
142
 
146
- ~unordered_set() BOOST_NOEXCEPT;
143
+ ~unordered_set() BOOST_NOEXCEPT;
147
144
 
148
- // Assign
145
+ // Assign
149
146
 
150
147
  #if defined(BOOST_UNORDERED_USE_MOVE)
151
- unordered_set& operator=(BOOST_COPY_ASSIGN_REF(unordered_set) x)
152
- {
153
- table_.assign(x.table_);
154
- return *this;
155
- }
148
+ unordered_set& operator=(BOOST_COPY_ASSIGN_REF(unordered_set) x)
149
+ {
150
+ table_.assign(x.table_);
151
+ return *this;
152
+ }
156
153
 
157
- unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
158
- {
159
- table_.move_assign(x.table_);
160
- return *this;
161
- }
154
+ unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
155
+ {
156
+ table_.move_assign(x.table_);
157
+ return *this;
158
+ }
162
159
  #else
163
- unordered_set& operator=(unordered_set const& x)
164
- {
165
- table_.assign(x.table_);
166
- return *this;
167
- }
160
+ unordered_set& operator=(unordered_set const& x)
161
+ {
162
+ table_.assign(x.table_);
163
+ return *this;
164
+ }
168
165
 
169
166
  #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
170
- unordered_set& operator=(unordered_set&& x)
171
- {
172
- table_.move_assign(x.table_);
173
- return *this;
174
- }
167
+ unordered_set& operator=(unordered_set&& x)
168
+ {
169
+ table_.move_assign(x.table_);
170
+ return *this;
171
+ }
175
172
  #endif
176
173
  #endif
177
174
 
178
175
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
179
- unordered_set& operator=(std::initializer_list<value_type>);
176
+ unordered_set& operator=(std::initializer_list<value_type>);
180
177
  #endif
181
178
 
182
- allocator_type get_allocator() const BOOST_NOEXCEPT
183
- {
184
- return table_.node_alloc();
185
- }
179
+ allocator_type get_allocator() const BOOST_NOEXCEPT
180
+ {
181
+ return table_.node_alloc();
182
+ }
186
183
 
187
- // size and capacity
184
+ // size and capacity
188
185
 
189
- bool empty() const BOOST_NOEXCEPT
190
- {
191
- return table_.size_ == 0;
192
- }
186
+ bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
193
187
 
194
- size_type size() const BOOST_NOEXCEPT
195
- {
196
- return table_.size_;
197
- }
188
+ size_type size() const BOOST_NOEXCEPT { return table_.size_; }
198
189
 
199
- size_type max_size() const BOOST_NOEXCEPT;
190
+ size_type max_size() const BOOST_NOEXCEPT;
200
191
 
201
- // iterators
192
+ // iterators
202
193
 
203
- iterator begin() BOOST_NOEXCEPT
204
- {
205
- return table_.begin();
206
- }
194
+ iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
207
195
 
208
- const_iterator begin() const BOOST_NOEXCEPT
209
- {
210
- return table_.begin();
211
- }
196
+ const_iterator begin() const BOOST_NOEXCEPT
197
+ {
198
+ return const_iterator(table_.begin());
199
+ }
212
200
 
213
- iterator end() BOOST_NOEXCEPT
214
- {
215
- return iterator();
216
- }
201
+ iterator end() BOOST_NOEXCEPT { return iterator(); }
217
202
 
218
- const_iterator end() const BOOST_NOEXCEPT
219
- {
220
- return const_iterator();
221
- }
203
+ const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
222
204
 
223
- const_iterator cbegin() const BOOST_NOEXCEPT
224
- {
225
- return table_.begin();
226
- }
205
+ const_iterator cbegin() const BOOST_NOEXCEPT
206
+ {
207
+ return const_iterator(table_.begin());
208
+ }
227
209
 
228
- const_iterator cend() const BOOST_NOEXCEPT
229
- {
230
- return const_iterator();
231
- }
210
+ const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
232
211
 
233
- // emplace
212
+ // extract
213
+
214
+ node_type extract(const_iterator position)
215
+ {
216
+ return node_type(
217
+ table_.extract_by_iterator(position), table_.node_alloc());
218
+ }
219
+
220
+ node_type extract(const key_type& k)
221
+ {
222
+ return node_type(table_.extract_by_key(k), table_.node_alloc());
223
+ }
224
+
225
+ // emplace
234
226
 
235
227
  #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
236
- template <class... Args>
237
- std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
238
- {
239
- return table_.emplace(boost::forward<Args>(args)...);
240
- }
228
+ template <class... Args>
229
+ std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
230
+ {
231
+ return table_.emplace(boost::forward<Args>(args)...);
232
+ }
241
233
 
242
- template <class... Args>
243
- iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args)
244
- {
245
- return table_.emplace(boost::forward<Args>(args)...).first;
246
- }
234
+ template <class... Args>
235
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
236
+ {
237
+ return table_.emplace_hint(hint, boost::forward<Args>(args)...);
238
+ }
247
239
  #else
248
240
 
249
241
  #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
250
242
 
251
- // 0 argument emplace requires special treatment in case
252
- // the container is instantiated with a value type that
253
- // doesn't have a default constructor.
243
+ // 0 argument emplace requires special treatment in case
244
+ // the container is instantiated with a value type that
245
+ // doesn't have a default constructor.
254
246
 
255
- std::pair<iterator, bool> emplace(
256
- boost::unordered::detail::empty_emplace
257
- = boost::unordered::detail::empty_emplace(),
258
- value_type v = value_type())
259
- {
260
- return this->emplace(boost::move(v));
261
- }
247
+ std::pair<iterator, bool> emplace(
248
+ boost::unordered::detail::empty_emplace =
249
+ boost::unordered::detail::empty_emplace(),
250
+ value_type v = value_type())
251
+ {
252
+ return this->emplace(boost::move(v));
253
+ }
262
254
 
263
- iterator emplace_hint(const_iterator hint,
264
- boost::unordered::detail::empty_emplace
265
- = boost::unordered::detail::empty_emplace(),
266
- value_type v = value_type()
267
- )
268
- {
269
- return this->emplace_hint(hint, boost::move(v));
270
- }
255
+ iterator emplace_hint(const_iterator hint,
256
+ boost::unordered::detail::empty_emplace =
257
+ boost::unordered::detail::empty_emplace(),
258
+ value_type v = value_type())
259
+ {
260
+ return this->emplace_hint(hint, boost::move(v));
261
+ }
271
262
 
272
263
  #endif
273
264
 
274
- template <typename A0>
275
- std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
276
- {
277
- return table_.emplace(
278
- boost::unordered::detail::create_emplace_args(
279
- boost::forward<A0>(a0))
280
- );
281
- }
265
+ template <typename A0>
266
+ std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
267
+ {
268
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
269
+ boost::forward<A0>(a0)));
270
+ }
282
271
 
283
- template <typename A0>
284
- iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
285
- {
286
- return table_.emplace(
287
- boost::unordered::detail::create_emplace_args(
288
- boost::forward<A0>(a0))
289
- ).first;
290
- }
272
+ template <typename A0>
273
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
274
+ {
275
+ return table_.emplace_hint(
276
+ hint, boost::unordered::detail::create_emplace_args(
277
+ boost::forward<A0>(a0)));
278
+ }
291
279
 
292
- template <typename A0, typename A1>
293
- std::pair<iterator, bool> emplace(
294
- BOOST_FWD_REF(A0) a0,
295
- BOOST_FWD_REF(A1) a1)
296
- {
297
- return table_.emplace(
298
- boost::unordered::detail::create_emplace_args(
299
- boost::forward<A0>(a0),
300
- boost::forward<A1>(a1))
301
- );
302
- }
280
+ template <typename A0, typename A1>
281
+ std::pair<iterator, bool> emplace(
282
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
283
+ {
284
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
285
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
286
+ }
303
287
 
304
- template <typename A0, typename A1>
305
- iterator emplace_hint(const_iterator,
306
- BOOST_FWD_REF(A0) a0,
307
- BOOST_FWD_REF(A1) a1)
308
- {
309
- return table_.emplace(
310
- boost::unordered::detail::create_emplace_args(
311
- boost::forward<A0>(a0),
312
- boost::forward<A1>(a1))
313
- ).first;
314
- }
288
+ template <typename A0, typename A1>
289
+ iterator emplace_hint(
290
+ const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
291
+ {
292
+ return table_.emplace_hint(
293
+ hint, boost::unordered::detail::create_emplace_args(
294
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
295
+ }
315
296
 
316
- template <typename A0, typename A1, typename A2>
317
- std::pair<iterator, bool> emplace(
318
- BOOST_FWD_REF(A0) a0,
319
- BOOST_FWD_REF(A1) a1,
320
- BOOST_FWD_REF(A2) a2)
321
- {
322
- return table_.emplace(
323
- boost::unordered::detail::create_emplace_args(
324
- boost::forward<A0>(a0),
325
- boost::forward<A1>(a1),
326
- boost::forward<A2>(a2))
327
- );
328
- }
297
+ template <typename A0, typename A1, typename A2>
298
+ std::pair<iterator, bool> emplace(
299
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
300
+ {
301
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
302
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
303
+ boost::forward<A2>(a2)));
304
+ }
329
305
 
330
- template <typename A0, typename A1, typename A2>
331
- iterator emplace_hint(const_iterator,
332
- BOOST_FWD_REF(A0) a0,
333
- BOOST_FWD_REF(A1) a1,
334
- BOOST_FWD_REF(A2) a2)
335
- {
336
- return table_.emplace(
337
- boost::unordered::detail::create_emplace_args(
338
- boost::forward<A0>(a0),
339
- boost::forward<A1>(a1),
340
- boost::forward<A2>(a2))
341
- ).first;
342
- }
306
+ template <typename A0, typename A1, typename A2>
307
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
308
+ BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
309
+ {
310
+ return table_.emplace_hint(
311
+ hint, boost::unordered::detail::create_emplace_args(
312
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
313
+ boost::forward<A2>(a2)));
314
+ }
343
315
 
344
- #define BOOST_UNORDERED_EMPLACE(z, n, _) \
345
- template < \
346
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
347
- > \
348
- std::pair<iterator, bool> emplace( \
349
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
350
- ) \
351
- { \
352
- return table_.emplace( \
353
- boost::unordered::detail::create_emplace_args( \
354
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
355
- a) \
356
- )); \
357
- } \
358
- \
359
- template < \
360
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
361
- > \
362
- iterator emplace_hint( \
363
- const_iterator, \
364
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
365
- ) \
366
- { \
367
- return table_.emplace( \
368
- boost::unordered::detail::create_emplace_args( \
369
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
370
- a) \
371
- )).first; \
372
- }
316
+ #define BOOST_UNORDERED_EMPLACE(z, n, _) \
317
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
318
+ std::pair<iterator, bool> emplace( \
319
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
320
+ { \
321
+ return table_.emplace(boost::unordered::detail::create_emplace_args( \
322
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
323
+ } \
324
+ \
325
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
326
+ iterator emplace_hint(const_iterator hint, \
327
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
328
+ { \
329
+ return table_.emplace_hint( \
330
+ hint, boost::unordered::detail::create_emplace_args( \
331
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
332
+ }
373
333
 
374
- BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT,
375
- BOOST_UNORDERED_EMPLACE, _)
334
+ BOOST_PP_REPEAT_FROM_TO(
335
+ 4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
376
336
 
377
337
  #undef BOOST_UNORDERED_EMPLACE
378
338
 
379
339
  #endif
380
340
 
381
- std::pair<iterator, bool> insert(value_type const& x)
382
- {
383
- return this->emplace(x);
384
- }
341
+ std::pair<iterator, bool> insert(value_type const& x)
342
+ {
343
+ return this->emplace(x);
344
+ }
385
345
 
386
- std::pair<iterator, bool> insert(BOOST_UNORDERED_RV_REF(value_type) x)
387
- {
388
- return this->emplace(boost::move(x));
389
- }
346
+ std::pair<iterator, bool> insert(BOOST_UNORDERED_RV_REF(value_type) x)
347
+ {
348
+ return this->emplace(boost::move(x));
349
+ }
390
350
 
391
- iterator insert(const_iterator hint, value_type const& x)
392
- {
393
- return this->emplace_hint(hint, x);
394
- }
351
+ iterator insert(const_iterator hint, value_type const& x)
352
+ {
353
+ return this->emplace_hint(hint, x);
354
+ }
395
355
 
396
- iterator insert(const_iterator hint,
397
- BOOST_UNORDERED_RV_REF(value_type) x)
398
- {
399
- return this->emplace_hint(hint, boost::move(x));
400
- }
356
+ iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
357
+ {
358
+ return this->emplace_hint(hint, boost::move(x));
359
+ }
401
360
 
402
- template <class InputIt> void insert(InputIt, InputIt);
361
+ template <class InputIt> void insert(InputIt, InputIt);
403
362
 
404
363
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
405
- void insert(std::initializer_list<value_type>);
364
+ void insert(std::initializer_list<value_type>);
406
365
  #endif
407
366
 
408
- iterator erase(const_iterator);
409
- size_type erase(const key_type&);
410
- iterator erase(const_iterator, const_iterator);
411
- void quick_erase(const_iterator it) { erase(it); }
412
- void erase_return_void(const_iterator it) { erase(it); }
367
+ insert_return_type insert(BOOST_RV_REF(node_type) np)
368
+ {
369
+ insert_return_type result;
370
+ table_.move_insert_node_type(np, result);
371
+ return boost::move(result);
372
+ }
413
373
 
414
- void clear();
415
- void swap(unordered_set&);
374
+ iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
375
+ {
376
+ return table_.move_insert_node_type_with_hint(hint, np);
377
+ }
416
378
 
417
- // observers
379
+ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
380
+ private:
381
+ // Note: Use r-value node_type to insert.
382
+ insert_return_type insert(node_type&);
383
+ iterator insert(const_iterator, node_type& np);
418
384
 
419
- hasher hash_function() const;
420
- key_equal key_eq() const;
385
+ public:
386
+ #endif
421
387
 
422
- // lookup
388
+ iterator erase(const_iterator);
389
+ size_type erase(const key_type&);
390
+ iterator erase(const_iterator, const_iterator);
391
+ void quick_erase(const_iterator it) { erase(it); }
392
+ void erase_return_void(const_iterator it) { erase(it); }
423
393
 
424
- const_iterator find(const key_type&) const;
394
+ void clear();
395
+ void swap(unordered_set&);
425
396
 
426
- template <class CompatibleKey, class CompatibleHash,
427
- class CompatiblePredicate>
428
- const_iterator find(
429
- CompatibleKey const&,
430
- CompatibleHash const&,
431
- CompatiblePredicate const&) const;
397
+ template <typename H2, typename P2>
398
+ void merge(boost::unordered_set<T, H2, P2, A>& source);
432
399
 
433
- size_type count(const key_type&) const;
400
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
401
+ template <typename H2, typename P2>
402
+ void merge(boost::unordered_set<T, H2, P2, A>&& source);
403
+ #endif
434
404
 
435
- std::pair<const_iterator, const_iterator>
436
- equal_range(const key_type&) const;
405
+ #if BOOST_UNORDERED_INTEROPERABLE_NODES
406
+ template <typename H2, typename P2>
407
+ void merge(boost::unordered_multiset<T, H2, P2, A>& source);
437
408
 
438
- // bucket interface
409
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
410
+ template <typename H2, typename P2>
411
+ void merge(boost::unordered_multiset<T, H2, P2, A>&& source);
412
+ #endif
413
+ #endif
439
414
 
440
- size_type bucket_count() const BOOST_NOEXCEPT
441
- {
442
- return table_.bucket_count_;
443
- }
415
+ // observers
444
416
 
445
- size_type max_bucket_count() const BOOST_NOEXCEPT
446
- {
447
- return table_.max_bucket_count();
448
- }
417
+ hasher hash_function() const;
418
+ key_equal key_eq() const;
449
419
 
450
- size_type bucket_size(size_type) const;
420
+ // lookup
451
421
 
452
- size_type bucket(const key_type& k) const
453
- {
454
- return table_.hash_to_bucket(table_.hash(k));
455
- }
422
+ const_iterator find(const key_type&) const;
456
423
 
457
- local_iterator begin(size_type n)
458
- {
459
- return local_iterator(
460
- table_.begin(n), n, table_.bucket_count_);
461
- }
424
+ template <class CompatibleKey, class CompatibleHash,
425
+ class CompatiblePredicate>
426
+ const_iterator find(CompatibleKey const&, CompatibleHash const&,
427
+ CompatiblePredicate const&) const;
462
428
 
463
- const_local_iterator begin(size_type n) const
464
- {
465
- return const_local_iterator(
466
- table_.begin(n), n, table_.bucket_count_);
467
- }
429
+ size_type count(const key_type&) const;
468
430
 
469
- local_iterator end(size_type)
470
- {
471
- return local_iterator();
472
- }
431
+ std::pair<const_iterator, const_iterator> equal_range(
432
+ const key_type&) const;
473
433
 
474
- const_local_iterator end(size_type) const
475
- {
476
- return const_local_iterator();
477
- }
434
+ // bucket interface
478
435
 
479
- const_local_iterator cbegin(size_type n) const
480
- {
481
- return const_local_iterator(
482
- table_.begin(n), n, table_.bucket_count_);
483
- }
436
+ size_type bucket_count() const BOOST_NOEXCEPT
437
+ {
438
+ return table_.bucket_count_;
439
+ }
484
440
 
485
- const_local_iterator cend(size_type) const
486
- {
487
- return const_local_iterator();
488
- }
441
+ size_type max_bucket_count() const BOOST_NOEXCEPT
442
+ {
443
+ return table_.max_bucket_count();
444
+ }
489
445
 
490
- // hash policy
446
+ size_type bucket_size(size_type) const;
491
447
 
492
- float max_load_factor() const BOOST_NOEXCEPT
493
- {
494
- return table_.mlf_;
495
- }
448
+ size_type bucket(const key_type& k) const
449
+ {
450
+ return table_.hash_to_bucket(table_.hash(k));
451
+ }
452
+
453
+ local_iterator begin(size_type n)
454
+ {
455
+ return local_iterator(table_.begin(n), n, table_.bucket_count_);
456
+ }
457
+
458
+ const_local_iterator begin(size_type n) const
459
+ {
460
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
461
+ }
462
+
463
+ local_iterator end(size_type) { return local_iterator(); }
464
+
465
+ const_local_iterator end(size_type) const { return const_local_iterator(); }
466
+
467
+ const_local_iterator cbegin(size_type n) const
468
+ {
469
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
470
+ }
471
+
472
+ const_local_iterator cend(size_type) const
473
+ {
474
+ return const_local_iterator();
475
+ }
476
+
477
+ // hash policy
478
+
479
+ float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
496
480
 
497
- float load_factor() const BOOST_NOEXCEPT;
498
- void max_load_factor(float) BOOST_NOEXCEPT;
499
- void rehash(size_type);
500
- void reserve(size_type);
481
+ float load_factor() const BOOST_NOEXCEPT;
482
+ void max_load_factor(float) BOOST_NOEXCEPT;
483
+ void rehash(size_type);
484
+ void reserve(size_type);
501
485
 
502
486
  #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
503
- friend bool operator==<T,H,P,A>(
504
- unordered_set const&, unordered_set const&);
505
- friend bool operator!=<T,H,P,A>(
506
- unordered_set const&, unordered_set const&);
487
+ friend bool operator==
488
+ <T, H, P, A>(unordered_set const&, unordered_set const&);
489
+ friend bool operator!=
490
+ <T, H, P, A>(unordered_set const&, unordered_set const&);
507
491
  #endif
508
- }; // class template unordered_set
492
+ }; // class template unordered_set
509
493
 
510
- template <class T, class H, class P, class A>
511
- class unordered_multiset
512
- {
494
+ template <class T, class H, class P, class A> class unordered_multiset
495
+ {
513
496
  #if defined(BOOST_UNORDERED_USE_MOVE)
514
- BOOST_COPYABLE_AND_MOVABLE(unordered_multiset)
497
+ BOOST_COPYABLE_AND_MOVABLE(unordered_multiset)
515
498
  #endif
516
- public:
499
+ template <typename, typename, typename, typename>
500
+ friend class unordered_set;
517
501
 
518
- typedef T key_type;
519
- typedef T value_type;
520
- typedef H hasher;
521
- typedef P key_equal;
522
- typedef A allocator_type;
502
+ public:
503
+ typedef T key_type;
504
+ typedef T value_type;
505
+ typedef H hasher;
506
+ typedef P key_equal;
507
+ typedef A allocator_type;
523
508
 
524
- private:
509
+ private:
510
+ typedef boost::unordered::detail::multiset<A, T, H, P> types;
511
+ typedef typename types::value_allocator_traits value_allocator_traits;
512
+ typedef typename types::table table;
525
513
 
526
- typedef boost::unordered::detail::multiset<A, T, H, P> types;
527
- typedef typename types::traits allocator_traits;
528
- typedef typename types::table table;
514
+ public:
515
+ typedef typename value_allocator_traits::pointer pointer;
516
+ typedef typename value_allocator_traits::const_pointer const_pointer;
529
517
 
530
- public:
518
+ typedef value_type& reference;
519
+ typedef value_type const& const_reference;
531
520
 
532
- typedef typename allocator_traits::pointer pointer;
533
- typedef typename allocator_traits::const_pointer const_pointer;
521
+ typedef std::size_t size_type;
522
+ typedef std::ptrdiff_t difference_type;
534
523
 
535
- typedef value_type& reference;
536
- typedef value_type const& const_reference;
524
+ typedef typename table::cl_iterator const_local_iterator;
525
+ typedef typename table::l_iterator local_iterator;
526
+ typedef typename table::c_iterator const_iterator;
527
+ typedef typename table::iterator iterator;
528
+ typedef typename types::node_type node_type;
537
529
 
538
- typedef std::size_t size_type;
539
- typedef std::ptrdiff_t difference_type;
530
+ private:
531
+ table table_;
540
532
 
541
- typedef typename table::cl_iterator const_local_iterator;
542
- typedef typename table::cl_iterator local_iterator;
543
- typedef typename table::c_iterator const_iterator;
544
- typedef typename table::c_iterator iterator;
533
+ public:
534
+ // constructors
545
535
 
546
- private:
536
+ unordered_multiset();
547
537
 
548
- table table_;
538
+ explicit unordered_multiset(size_type, const hasher& = hasher(),
539
+ const key_equal& = key_equal(),
540
+ const allocator_type& = allocator_type());
549
541
 
550
- public:
542
+ explicit unordered_multiset(size_type, const allocator_type&);
551
543
 
552
- // constructors
544
+ explicit unordered_multiset(
545
+ size_type, const hasher&, const allocator_type&);
553
546
 
554
- explicit unordered_multiset(
555
- size_type = boost::unordered::detail::default_bucket_count,
556
- const hasher& = hasher(),
557
- const key_equal& = key_equal(),
558
- const allocator_type& = allocator_type());
547
+ explicit unordered_multiset(allocator_type const&);
559
548
 
560
- explicit unordered_multiset(allocator_type const&);
549
+ template <class InputIt> unordered_multiset(InputIt, InputIt);
561
550
 
562
- template <class InputIt>
563
- unordered_multiset(InputIt, InputIt);
551
+ template <class InputIt>
552
+ unordered_multiset(InputIt, InputIt, size_type, const hasher& = hasher(),
553
+ const key_equal& = key_equal());
554
+
555
+ template <class InputIt>
556
+ unordered_multiset(InputIt, InputIt, size_type, const hasher&,
557
+ const key_equal&, const allocator_type&);
564
558
 
565
- template <class InputIt>
566
- unordered_multiset(
567
- InputIt, InputIt,
568
- size_type,
569
- const hasher& = hasher(),
570
- const key_equal& = key_equal());
559
+ template <class InputIt>
560
+ unordered_multiset(
561
+ InputIt, InputIt, size_type, const hasher&, const allocator_type&);
571
562
 
572
- template <class InputIt>
573
- unordered_multiset(
574
- InputIt, InputIt,
575
- size_type,
576
- const hasher&,
577
- const key_equal&,
578
- const allocator_type&);
563
+ template <class InputIt>
564
+ unordered_multiset(InputIt, InputIt, size_type, const allocator_type&);
579
565
 
580
- // copy/move constructors
566
+ // copy/move constructors
581
567
 
582
- unordered_multiset(unordered_multiset const&);
568
+ unordered_multiset(unordered_multiset const&);
583
569
 
584
- unordered_multiset(unordered_multiset const&, allocator_type const&);
570
+ unordered_multiset(unordered_multiset const&, allocator_type const&);
571
+ unordered_multiset(BOOST_RV_REF(unordered_multiset), allocator_type const&);
585
572
 
586
573
  #if defined(BOOST_UNORDERED_USE_MOVE)
587
- unordered_multiset(BOOST_RV_REF(unordered_multiset) other)
588
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
589
- : table_(other.table_, boost::unordered::detail::move_tag())
590
- {
591
- }
574
+ unordered_multiset(BOOST_RV_REF(unordered_multiset) other)
575
+ BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
576
+ : table_(other.table_, boost::unordered::detail::move_tag())
577
+ {
578
+ }
592
579
  #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
593
- unordered_multiset(unordered_multiset&& other)
594
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
595
- : table_(other.table_, boost::unordered::detail::move_tag())
596
- {
597
- }
598
- #endif
599
-
600
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
601
- unordered_multiset(unordered_multiset&&, allocator_type const&);
580
+ unordered_multiset(unordered_multiset&& other)
581
+ BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
582
+ : table_(other.table_, boost::unordered::detail::move_tag())
583
+ {
584
+ }
602
585
  #endif
603
586
 
604
587
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
605
- unordered_multiset(
606
- std::initializer_list<value_type>,
607
- size_type = boost::unordered::detail::default_bucket_count,
608
- const hasher& = hasher(),
609
- const key_equal&l = key_equal(),
610
- const allocator_type& = allocator_type());
588
+ unordered_multiset(std::initializer_list<value_type>,
589
+ size_type = boost::unordered::detail::default_bucket_count,
590
+ const hasher& = hasher(), const key_equal& l = key_equal(),
591
+ const allocator_type& = allocator_type());
592
+ unordered_multiset(std::initializer_list<value_type>, size_type,
593
+ const hasher&, const allocator_type&);
594
+ unordered_multiset(
595
+ std::initializer_list<value_type>, size_type, const allocator_type&);
611
596
  #endif
612
597
 
613
- // Destructor
598
+ // Destructor
614
599
 
615
- ~unordered_multiset() BOOST_NOEXCEPT;
600
+ ~unordered_multiset() BOOST_NOEXCEPT;
616
601
 
617
- // Assign
602
+ // Assign
618
603
 
619
604
  #if defined(BOOST_UNORDERED_USE_MOVE)
620
- unordered_multiset& operator=(
621
- BOOST_COPY_ASSIGN_REF(unordered_multiset) x)
622
- {
623
- table_.assign(x.table_);
624
- return *this;
625
- }
605
+ unordered_multiset& operator=(BOOST_COPY_ASSIGN_REF(unordered_multiset) x)
606
+ {
607
+ table_.assign(x.table_);
608
+ return *this;
609
+ }
626
610
 
627
- unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
628
- {
629
- table_.move_assign(x.table_);
630
- return *this;
631
- }
611
+ unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
612
+ {
613
+ table_.move_assign(x.table_);
614
+ return *this;
615
+ }
632
616
  #else
633
- unordered_multiset& operator=(unordered_multiset const& x)
634
- {
635
- table_.assign(x.table_);
636
- return *this;
637
- }
617
+ unordered_multiset& operator=(unordered_multiset const& x)
618
+ {
619
+ table_.assign(x.table_);
620
+ return *this;
621
+ }
638
622
 
639
623
  #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
640
- unordered_multiset& operator=(unordered_multiset&& x)
641
- {
642
- table_.move_assign(x.table_);
643
- return *this;
644
- }
624
+ unordered_multiset& operator=(unordered_multiset&& x)
625
+ {
626
+ table_.move_assign(x.table_);
627
+ return *this;
628
+ }
645
629
  #endif
646
630
  #endif
647
631
 
648
632
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
649
- unordered_multiset& operator=(std::initializer_list<value_type>);
633
+ unordered_multiset& operator=(std::initializer_list<value_type>);
650
634
  #endif
651
635
 
652
- allocator_type get_allocator() const BOOST_NOEXCEPT
653
- {
654
- return table_.node_alloc();
655
- }
636
+ allocator_type get_allocator() const BOOST_NOEXCEPT
637
+ {
638
+ return table_.node_alloc();
639
+ }
656
640
 
657
- // size and capacity
641
+ // size and capacity
658
642
 
659
- bool empty() const BOOST_NOEXCEPT
660
- {
661
- return table_.size_ == 0;
662
- }
643
+ bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
663
644
 
664
- size_type size() const BOOST_NOEXCEPT
665
- {
666
- return table_.size_;
667
- }
645
+ size_type size() const BOOST_NOEXCEPT { return table_.size_; }
668
646
 
669
- size_type max_size() const BOOST_NOEXCEPT;
647
+ size_type max_size() const BOOST_NOEXCEPT;
670
648
 
671
- // iterators
649
+ // iterators
672
650
 
673
- iterator begin() BOOST_NOEXCEPT
674
- {
675
- return iterator(table_.begin());
676
- }
651
+ iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
677
652
 
678
- const_iterator begin() const BOOST_NOEXCEPT
679
- {
680
- return const_iterator(table_.begin());
681
- }
653
+ const_iterator begin() const BOOST_NOEXCEPT
654
+ {
655
+ return const_iterator(table_.begin());
656
+ }
682
657
 
683
- iterator end() BOOST_NOEXCEPT
684
- {
685
- return iterator();
686
- }
658
+ iterator end() BOOST_NOEXCEPT { return iterator(); }
687
659
 
688
- const_iterator end() const BOOST_NOEXCEPT
689
- {
690
- return const_iterator();
691
- }
660
+ const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
692
661
 
693
- const_iterator cbegin() const BOOST_NOEXCEPT
694
- {
695
- return const_iterator(table_.begin());
696
- }
662
+ const_iterator cbegin() const BOOST_NOEXCEPT
663
+ {
664
+ return const_iterator(table_.begin());
665
+ }
697
666
 
698
- const_iterator cend() const BOOST_NOEXCEPT
699
- {
700
- return const_iterator();
701
- }
667
+ const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
668
+
669
+ // extract
670
+
671
+ node_type extract(const_iterator position)
672
+ {
673
+ return node_type(
674
+ table_.extract_by_iterator(position), table_.node_alloc());
675
+ }
676
+
677
+ node_type extract(const key_type& k)
678
+ {
679
+ return node_type(table_.extract_by_key(k), table_.node_alloc());
680
+ }
702
681
 
703
- // emplace
682
+ // emplace
704
683
 
705
684
  #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
706
- template <class... Args>
707
- iterator emplace(BOOST_FWD_REF(Args)... args)
708
- {
709
- return table_.emplace(boost::forward<Args>(args)...);
710
- }
685
+ template <class... Args> iterator emplace(BOOST_FWD_REF(Args)... args)
686
+ {
687
+ return table_.emplace(boost::forward<Args>(args)...);
688
+ }
711
689
 
712
- template <class... Args>
713
- iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args)
714
- {
715
- return table_.emplace(boost::forward<Args>(args)...);
716
- }
690
+ template <class... Args>
691
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
692
+ {
693
+ return table_.emplace_hint(hint, boost::forward<Args>(args)...);
694
+ }
717
695
  #else
718
696
 
719
697
  #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
720
698
 
721
- // 0 argument emplace requires special treatment in case
722
- // the container is instantiated with a value type that
723
- // doesn't have a default constructor.
699
+ // 0 argument emplace requires special treatment in case
700
+ // the container is instantiated with a value type that
701
+ // doesn't have a default constructor.
724
702
 
725
- iterator emplace(
726
- boost::unordered::detail::empty_emplace
727
- = boost::unordered::detail::empty_emplace(),
728
- value_type v = value_type())
729
- {
730
- return this->emplace(boost::move(v));
731
- }
703
+ iterator emplace(boost::unordered::detail::empty_emplace =
704
+ boost::unordered::detail::empty_emplace(),
705
+ value_type v = value_type())
706
+ {
707
+ return this->emplace(boost::move(v));
708
+ }
732
709
 
733
- iterator emplace_hint(const_iterator hint,
734
- boost::unordered::detail::empty_emplace
735
- = boost::unordered::detail::empty_emplace(),
736
- value_type v = value_type()
737
- )
738
- {
739
- return this->emplace_hint(hint, boost::move(v));
740
- }
710
+ iterator emplace_hint(const_iterator hint,
711
+ boost::unordered::detail::empty_emplace =
712
+ boost::unordered::detail::empty_emplace(),
713
+ value_type v = value_type())
714
+ {
715
+ return this->emplace_hint(hint, boost::move(v));
716
+ }
741
717
 
742
718
  #endif
743
719
 
744
- template <typename A0>
745
- iterator emplace(BOOST_FWD_REF(A0) a0)
746
- {
747
- return table_.emplace(
748
- boost::unordered::detail::create_emplace_args(
749
- boost::forward<A0>(a0))
750
- );
751
- }
720
+ template <typename A0> iterator emplace(BOOST_FWD_REF(A0) a0)
721
+ {
722
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
723
+ boost::forward<A0>(a0)));
724
+ }
752
725
 
753
- template <typename A0>
754
- iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
755
- {
756
- return table_.emplace(
757
- boost::unordered::detail::create_emplace_args(
758
- boost::forward<A0>(a0))
759
- );
760
- }
726
+ template <typename A0>
727
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
728
+ {
729
+ return table_.emplace_hint(
730
+ hint, boost::unordered::detail::create_emplace_args(
731
+ boost::forward<A0>(a0)));
732
+ }
761
733
 
762
- template <typename A0, typename A1>
763
- iterator emplace(
764
- BOOST_FWD_REF(A0) a0,
765
- BOOST_FWD_REF(A1) a1)
766
- {
767
- return table_.emplace(
768
- boost::unordered::detail::create_emplace_args(
769
- boost::forward<A0>(a0),
770
- boost::forward<A1>(a1))
771
- );
772
- }
734
+ template <typename A0, typename A1>
735
+ iterator emplace(BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
736
+ {
737
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
738
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
739
+ }
773
740
 
774
- template <typename A0, typename A1>
775
- iterator emplace_hint(const_iterator,
776
- BOOST_FWD_REF(A0) a0,
777
- BOOST_FWD_REF(A1) a1)
778
- {
779
- return table_.emplace(
780
- boost::unordered::detail::create_emplace_args(
781
- boost::forward<A0>(a0),
782
- boost::forward<A1>(a1))
783
- );
784
- }
741
+ template <typename A0, typename A1>
742
+ iterator emplace_hint(
743
+ const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
744
+ {
745
+ return table_.emplace_hint(
746
+ hint, boost::unordered::detail::create_emplace_args(
747
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
748
+ }
785
749
 
786
- template <typename A0, typename A1, typename A2>
787
- iterator emplace(
788
- BOOST_FWD_REF(A0) a0,
789
- BOOST_FWD_REF(A1) a1,
790
- BOOST_FWD_REF(A2) a2)
791
- {
792
- return table_.emplace(
793
- boost::unordered::detail::create_emplace_args(
794
- boost::forward<A0>(a0),
795
- boost::forward<A1>(a1),
796
- boost::forward<A2>(a2))
797
- );
798
- }
750
+ template <typename A0, typename A1, typename A2>
751
+ iterator emplace(
752
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
753
+ {
754
+ return table_.emplace(boost::unordered::detail::create_emplace_args(
755
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
756
+ boost::forward<A2>(a2)));
757
+ }
799
758
 
800
- template <typename A0, typename A1, typename A2>
801
- iterator emplace_hint(const_iterator,
802
- BOOST_FWD_REF(A0) a0,
803
- BOOST_FWD_REF(A1) a1,
804
- BOOST_FWD_REF(A2) a2)
805
- {
806
- return table_.emplace(
807
- boost::unordered::detail::create_emplace_args(
808
- boost::forward<A0>(a0),
809
- boost::forward<A1>(a1),
810
- boost::forward<A2>(a2))
811
- );
812
- }
759
+ template <typename A0, typename A1, typename A2>
760
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
761
+ BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
762
+ {
763
+ return table_.emplace_hint(
764
+ hint, boost::unordered::detail::create_emplace_args(
765
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
766
+ boost::forward<A2>(a2)));
767
+ }
813
768
 
814
- #define BOOST_UNORDERED_EMPLACE(z, n, _) \
815
- template < \
816
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
817
- > \
818
- iterator emplace( \
819
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
820
- ) \
821
- { \
822
- return table_.emplace( \
823
- boost::unordered::detail::create_emplace_args( \
824
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
825
- a) \
826
- )); \
827
- } \
828
- \
829
- template < \
830
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
831
- > \
832
- iterator emplace_hint( \
833
- const_iterator, \
834
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
835
- ) \
836
- { \
837
- return table_.emplace( \
838
- boost::unordered::detail::create_emplace_args( \
839
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
840
- a) \
841
- )); \
842
- }
769
+ #define BOOST_UNORDERED_EMPLACE(z, n, _) \
770
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
771
+ iterator emplace(BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
772
+ { \
773
+ return table_.emplace(boost::unordered::detail::create_emplace_args( \
774
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
775
+ } \
776
+ \
777
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
778
+ iterator emplace_hint(const_iterator hint, \
779
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
780
+ { \
781
+ return table_.emplace_hint( \
782
+ hint, boost::unordered::detail::create_emplace_args( \
783
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
784
+ }
843
785
 
844
- BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT,
845
- BOOST_UNORDERED_EMPLACE, _)
786
+ BOOST_PP_REPEAT_FROM_TO(
787
+ 4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
846
788
 
847
789
  #undef BOOST_UNORDERED_EMPLACE
848
790
 
849
791
  #endif
850
792
 
851
- iterator insert(value_type const& x)
852
- {
853
- return this->emplace(x);
854
- }
793
+ iterator insert(value_type const& x) { return this->emplace(x); }
855
794
 
856
- iterator insert(BOOST_UNORDERED_RV_REF(value_type) x)
857
- {
858
- return this->emplace(boost::move(x));
859
- }
795
+ iterator insert(BOOST_UNORDERED_RV_REF(value_type) x)
796
+ {
797
+ return this->emplace(boost::move(x));
798
+ }
860
799
 
861
- iterator insert(const_iterator hint, value_type const& x)
862
- {
863
- return this->emplace_hint(hint, x);
864
- }
800
+ iterator insert(const_iterator hint, value_type const& x)
801
+ {
802
+ return this->emplace_hint(hint, x);
803
+ }
865
804
 
866
- iterator insert(const_iterator hint,
867
- BOOST_UNORDERED_RV_REF(value_type) x)
868
- {
869
- return this->emplace_hint(hint, boost::move(x));
870
- }
805
+ iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
806
+ {
807
+ return this->emplace_hint(hint, boost::move(x));
808
+ }
871
809
 
872
- template <class InputIt> void insert(InputIt, InputIt);
810
+ template <class InputIt> void insert(InputIt, InputIt);
873
811
 
874
812
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
875
- void insert(std::initializer_list<value_type>);
813
+ void insert(std::initializer_list<value_type>);
876
814
  #endif
877
815
 
878
- iterator erase(const_iterator);
879
- size_type erase(const key_type&);
880
- iterator erase(const_iterator, const_iterator);
881
- void quick_erase(const_iterator it) { erase(it); }
882
- void erase_return_void(const_iterator it) { erase(it); }
816
+ iterator insert(BOOST_RV_REF(node_type) np)
817
+ {
818
+ return table_.move_insert_node_type(np);
819
+ }
883
820
 
884
- void clear();
885
- void swap(unordered_multiset&);
821
+ iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
822
+ {
823
+ return table_.move_insert_node_type_with_hint(hint, np);
824
+ }
886
825
 
887
- // observers
826
+ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
827
+ private:
828
+ // Note: Use r-value node_type to insert.
829
+ iterator insert(node_type&);
830
+ iterator insert(const_iterator, node_type& np);
888
831
 
889
- hasher hash_function() const;
890
- key_equal key_eq() const;
832
+ public:
833
+ #endif
891
834
 
892
- // lookup
835
+ iterator erase(const_iterator);
836
+ size_type erase(const key_type&);
837
+ iterator erase(const_iterator, const_iterator);
838
+ void quick_erase(const_iterator it) { erase(it); }
839
+ void erase_return_void(const_iterator it) { erase(it); }
893
840
 
894
- const_iterator find(const key_type&) const;
841
+ void clear();
842
+ void swap(unordered_multiset&);
895
843
 
896
- template <class CompatibleKey, class CompatibleHash,
897
- class CompatiblePredicate>
898
- const_iterator find(
899
- CompatibleKey const&,
900
- CompatibleHash const&,
901
- CompatiblePredicate const&) const;
844
+ template <typename H2, typename P2>
845
+ void merge(boost::unordered_multiset<T, H2, P2, A>& source);
902
846
 
903
- size_type count(const key_type&) const;
847
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
848
+ template <typename H2, typename P2>
849
+ void merge(boost::unordered_multiset<T, H2, P2, A>&& source);
850
+ #endif
904
851
 
905
- std::pair<const_iterator, const_iterator>
906
- equal_range(const key_type&) const;
852
+ #if BOOST_UNORDERED_INTEROPERABLE_NODES
853
+ template <typename H2, typename P2>
854
+ void merge(boost::unordered_set<T, H2, P2, A>& source);
907
855
 
908
- // bucket interface
856
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
857
+ template <typename H2, typename P2>
858
+ void merge(boost::unordered_set<T, H2, P2, A>&& source);
859
+ #endif
860
+ #endif
909
861
 
910
- size_type bucket_count() const BOOST_NOEXCEPT
911
- {
912
- return table_.bucket_count_;
913
- }
862
+ // observers
914
863
 
915
- size_type max_bucket_count() const BOOST_NOEXCEPT
916
- {
917
- return table_.max_bucket_count();
918
- }
864
+ hasher hash_function() const;
865
+ key_equal key_eq() const;
919
866
 
920
- size_type bucket_size(size_type) const;
921
-
922
- size_type bucket(const key_type& k) const
923
- {
924
- return table_.hash_to_bucket(table_.hash(k));
925
- }
926
-
927
- local_iterator begin(size_type n)
928
- {
929
- return local_iterator(
930
- table_.begin(n), n, table_.bucket_count_);
931
- }
932
-
933
- const_local_iterator begin(size_type n) const
934
- {
935
- return const_local_iterator(
936
- table_.begin(n), n, table_.bucket_count_);
937
- }
938
-
939
- local_iterator end(size_type)
940
- {
941
- return local_iterator();
942
- }
943
-
944
- const_local_iterator end(size_type) const
945
- {
946
- return const_local_iterator();
947
- }
948
-
949
- const_local_iterator cbegin(size_type n) const
950
- {
951
- return const_local_iterator(
952
- table_.begin(n), n, table_.bucket_count_);
953
- }
954
-
955
- const_local_iterator cend(size_type) const
956
- {
957
- return const_local_iterator();
958
- }
867
+ // lookup
959
868
 
960
- // hash policy
869
+ const_iterator find(const key_type&) const;
961
870
 
962
- float max_load_factor() const BOOST_NOEXCEPT
963
- {
964
- return table_.mlf_;
965
- }
871
+ template <class CompatibleKey, class CompatibleHash,
872
+ class CompatiblePredicate>
873
+ const_iterator find(CompatibleKey const&, CompatibleHash const&,
874
+ CompatiblePredicate const&) const;
966
875
 
967
- float load_factor() const BOOST_NOEXCEPT;
968
- void max_load_factor(float) BOOST_NOEXCEPT;
969
- void rehash(size_type);
970
- void reserve(size_type);
876
+ size_type count(const key_type&) const;
971
877
 
972
- #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
973
- friend bool operator==<T,H,P,A>(
974
- unordered_multiset const&, unordered_multiset const&);
975
- friend bool operator!=<T,H,P,A>(
976
- unordered_multiset const&, unordered_multiset const&);
977
- #endif
978
- }; // class template unordered_multiset
878
+ std::pair<const_iterator, const_iterator> equal_range(
879
+ const key_type&) const;
979
880
 
980
- ////////////////////////////////////////////////////////////////////////////////
881
+ // bucket interface
981
882
 
982
- template <class T, class H, class P, class A>
983
- unordered_set<T,H,P,A>::unordered_set(
984
- size_type n, const hasher &hf, const key_equal &eql,
985
- const allocator_type &a)
986
- : table_(n, hf, eql, a)
883
+ size_type bucket_count() const BOOST_NOEXCEPT
987
884
  {
885
+ return table_.bucket_count_;
988
886
  }
989
887
 
990
- template <class T, class H, class P, class A>
991
- unordered_set<T,H,P,A>::unordered_set(allocator_type const& a)
992
- : table_(boost::unordered::detail::default_bucket_count,
993
- hasher(), key_equal(), a)
888
+ size_type max_bucket_count() const BOOST_NOEXCEPT
994
889
  {
890
+ return table_.max_bucket_count();
995
891
  }
996
892
 
997
- template <class T, class H, class P, class A>
998
- unordered_set<T,H,P,A>::unordered_set(
999
- unordered_set const& other, allocator_type const& a)
1000
- : table_(other.table_, a)
893
+ size_type bucket_size(size_type) const;
894
+
895
+ size_type bucket(const key_type& k) const
1001
896
  {
897
+ return table_.hash_to_bucket(table_.hash(k));
1002
898
  }
1003
899
 
1004
- template <class T, class H, class P, class A>
1005
- template <class InputIt>
1006
- unordered_set<T,H,P,A>::unordered_set(InputIt f, InputIt l)
1007
- : table_(boost::unordered::detail::initial_size(f, l),
1008
- hasher(), key_equal(), allocator_type())
900
+ local_iterator begin(size_type n)
1009
901
  {
1010
- table_.insert_range(f, l);
902
+ return local_iterator(table_.begin(n), n, table_.bucket_count_);
1011
903
  }
1012
904
 
1013
- template <class T, class H, class P, class A>
1014
- template <class InputIt>
1015
- unordered_set<T,H,P,A>::unordered_set(
1016
- InputIt f, InputIt l,
1017
- size_type n,
1018
- const hasher &hf,
1019
- const key_equal &eql)
1020
- : table_(boost::unordered::detail::initial_size(f, l, n),
1021
- hf, eql, allocator_type())
1022
- {
1023
- table_.insert_range(f, l);
1024
- }
1025
-
1026
- template <class T, class H, class P, class A>
1027
- template <class InputIt>
1028
- unordered_set<T,H,P,A>::unordered_set(
1029
- InputIt f, InputIt l,
1030
- size_type n,
1031
- const hasher &hf,
1032
- const key_equal &eql,
1033
- const allocator_type &a)
1034
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
905
+ const_local_iterator begin(size_type n) const
1035
906
  {
1036
- table_.insert_range(f, l);
907
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1037
908
  }
1038
-
1039
- template <class T, class H, class P, class A>
1040
- unordered_set<T,H,P,A>::~unordered_set() BOOST_NOEXCEPT {}
1041
909
 
1042
- template <class T, class H, class P, class A>
1043
- unordered_set<T,H,P,A>::unordered_set(
1044
- unordered_set const& other)
1045
- : table_(other.table_)
910
+ local_iterator end(size_type) { return local_iterator(); }
911
+
912
+ const_local_iterator end(size_type) const { return const_local_iterator(); }
913
+
914
+ const_local_iterator cbegin(size_type n) const
1046
915
  {
916
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1047
917
  }
1048
918
 
1049
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1050
-
1051
- template <class T, class H, class P, class A>
1052
- unordered_set<T,H,P,A>::unordered_set(
1053
- unordered_set&& other, allocator_type const& a)
1054
- : table_(other.table_, a, boost::unordered::detail::move_tag())
919
+ const_local_iterator cend(size_type) const
1055
920
  {
921
+ return const_local_iterator();
1056
922
  }
1057
923
 
924
+ // hash policy
925
+
926
+ float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
927
+
928
+ float load_factor() const BOOST_NOEXCEPT;
929
+ void max_load_factor(float) BOOST_NOEXCEPT;
930
+ void rehash(size_type);
931
+ void reserve(size_type);
932
+
933
+ #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
934
+ friend bool operator==
935
+ <T, H, P, A>(unordered_multiset const&, unordered_multiset const&);
936
+ friend bool operator!=
937
+ <T, H, P, A>(unordered_multiset const&, unordered_multiset const&);
1058
938
  #endif
939
+ }; // class template unordered_multiset
940
+
941
+ ////////////////////////////////////////////////////////////////////////////////
942
+
943
+ template <class T, class H, class P, class A>
944
+ unordered_set<T, H, P, A>::unordered_set()
945
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
946
+ key_equal(), allocator_type())
947
+ {
948
+ }
949
+
950
+ template <class T, class H, class P, class A>
951
+ unordered_set<T, H, P, A>::unordered_set(size_type n, const hasher& hf,
952
+ const key_equal& eql, const allocator_type& a)
953
+ : table_(n, hf, eql, a)
954
+ {
955
+ }
956
+
957
+ template <class T, class H, class P, class A>
958
+ unordered_set<T, H, P, A>::unordered_set(size_type n, const allocator_type& a)
959
+ : table_(n, hasher(), key_equal(), a)
960
+ {
961
+ }
962
+
963
+ template <class T, class H, class P, class A>
964
+ unordered_set<T, H, P, A>::unordered_set(
965
+ size_type n, const hasher& hf, const allocator_type& a)
966
+ : table_(n, hf, key_equal(), a)
967
+ {
968
+ }
969
+
970
+ template <class T, class H, class P, class A>
971
+ unordered_set<T, H, P, A>::unordered_set(allocator_type const& a)
972
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
973
+ key_equal(), a)
974
+ {
975
+ }
976
+
977
+ template <class T, class H, class P, class A>
978
+ unordered_set<T, H, P, A>::unordered_set(
979
+ unordered_set const& other, allocator_type const& a)
980
+ : table_(other.table_, a)
981
+ {
982
+ }
983
+
984
+ template <class T, class H, class P, class A>
985
+ template <class InputIt>
986
+ unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l)
987
+ : table_(boost::unordered::detail::initial_size(f, l), hasher(),
988
+ key_equal(), allocator_type())
989
+ {
990
+ table_.insert_range(f, l);
991
+ }
992
+
993
+ template <class T, class H, class P, class A>
994
+ template <class InputIt>
995
+ unordered_set<T, H, P, A>::unordered_set(
996
+ InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
997
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
998
+ allocator_type())
999
+ {
1000
+ table_.insert_range(f, l);
1001
+ }
1002
+
1003
+ template <class T, class H, class P, class A>
1004
+ template <class InputIt>
1005
+ unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l, size_type n,
1006
+ const hasher& hf, const key_equal& eql, const allocator_type& a)
1007
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
1008
+ {
1009
+ table_.insert_range(f, l);
1010
+ }
1011
+
1012
+ template <class T, class H, class P, class A>
1013
+ template <class InputIt>
1014
+ unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l, size_type n,
1015
+ const hasher& hf, const allocator_type& a)
1016
+ : table_(
1017
+ boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
1018
+ {
1019
+ table_.insert_range(f, l);
1020
+ }
1021
+
1022
+ template <class T, class H, class P, class A>
1023
+ template <class InputIt>
1024
+ unordered_set<T, H, P, A>::unordered_set(
1025
+ InputIt f, InputIt l, size_type n, const allocator_type& a)
1026
+ : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
1027
+ key_equal(), a)
1028
+ {
1029
+ table_.insert_range(f, l);
1030
+ }
1031
+
1032
+ template <class T, class H, class P, class A>
1033
+ unordered_set<T, H, P, A>::~unordered_set() BOOST_NOEXCEPT
1034
+ {
1035
+ }
1036
+
1037
+ template <class T, class H, class P, class A>
1038
+ unordered_set<T, H, P, A>::unordered_set(unordered_set const& other)
1039
+ : table_(other.table_)
1040
+ {
1041
+ }
1042
+
1043
+ template <class T, class H, class P, class A>
1044
+ unordered_set<T, H, P, A>::unordered_set(
1045
+ BOOST_RV_REF(unordered_set) other, allocator_type const& a)
1046
+ : table_(other.table_, a, boost::unordered::detail::move_tag())
1047
+ {
1048
+ }
1059
1049
 
1060
1050
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1061
1051
 
1062
- template <class T, class H, class P, class A>
1063
- unordered_set<T,H,P,A>::unordered_set(
1064
- std::initializer_list<value_type> list, size_type n,
1065
- const hasher &hf, const key_equal &eql, const allocator_type &a)
1066
- : table_(
1067
- boost::unordered::detail::initial_size(
1068
- list.begin(), list.end(), n),
1069
- hf, eql, a)
1070
- {
1071
- table_.insert_range(list.begin(), list.end());
1072
- }
1052
+ template <class T, class H, class P, class A>
1053
+ unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
1054
+ size_type n, const hasher& hf, const key_equal& eql,
1055
+ const allocator_type& a)
1056
+ : table_(
1057
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1058
+ hf, eql, a)
1059
+ {
1060
+ table_.insert_range(list.begin(), list.end());
1061
+ }
1062
+
1063
+ template <class T, class H, class P, class A>
1064
+ unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
1065
+ size_type n, const hasher& hf, const allocator_type& a)
1066
+ : table_(
1067
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1068
+ hf, key_equal(), a)
1069
+ {
1070
+ table_.insert_range(list.begin(), list.end());
1071
+ }
1072
+
1073
+ template <class T, class H, class P, class A>
1074
+ unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
1075
+ size_type n, const allocator_type& a)
1076
+ : table_(
1077
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1078
+ hasher(), key_equal(), a)
1079
+ {
1080
+ table_.insert_range(list.begin(), list.end());
1081
+ }
1073
1082
 
1074
- template <class T, class H, class P, class A>
1075
- unordered_set<T,H,P,A>& unordered_set<T,H,P,A>::operator=(
1076
- std::initializer_list<value_type> list)
1077
- {
1078
- table_.clear();
1079
- table_.insert_range(list.begin(), list.end());
1080
- return *this;
1081
- }
1083
+ template <class T, class H, class P, class A>
1084
+ unordered_set<T, H, P, A>& unordered_set<T, H, P, A>::operator=(
1085
+ std::initializer_list<value_type> list)
1086
+ {
1087
+ table_.clear();
1088
+ table_.insert_range(list.begin(), list.end());
1089
+ return *this;
1090
+ }
1082
1091
 
1083
1092
  #endif
1084
1093
 
1085
- // size and capacity
1094
+ // size and capacity
1086
1095
 
1087
- template <class T, class H, class P, class A>
1088
- std::size_t unordered_set<T,H,P,A>::max_size() const BOOST_NOEXCEPT
1089
- {
1090
- return table_.max_size();
1091
- }
1096
+ template <class T, class H, class P, class A>
1097
+ std::size_t unordered_set<T, H, P, A>::max_size() const BOOST_NOEXCEPT
1098
+ {
1099
+ return table_.max_size();
1100
+ }
1092
1101
 
1093
- // modifiers
1102
+ // modifiers
1094
1103
 
1095
- template <class T, class H, class P, class A>
1096
- template <class InputIt>
1097
- void unordered_set<T,H,P,A>::insert(InputIt first, InputIt last)
1098
- {
1099
- table_.insert_range(first, last);
1100
- }
1104
+ template <class T, class H, class P, class A>
1105
+ template <class InputIt>
1106
+ void unordered_set<T, H, P, A>::insert(InputIt first, InputIt last)
1107
+ {
1108
+ table_.insert_range(first, last);
1109
+ }
1101
1110
 
1102
1111
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1103
- template <class T, class H, class P, class A>
1104
- void unordered_set<T,H,P,A>::insert(
1105
- std::initializer_list<value_type> list)
1106
- {
1107
- table_.insert_range(list.begin(), list.end());
1108
- }
1112
+ template <class T, class H, class P, class A>
1113
+ void unordered_set<T, H, P, A>::insert(std::initializer_list<value_type> list)
1114
+ {
1115
+ table_.insert_range(list.begin(), list.end());
1116
+ }
1109
1117
  #endif
1110
1118
 
1111
- template <class T, class H, class P, class A>
1112
- typename unordered_set<T,H,P,A>::iterator
1113
- unordered_set<T,H,P,A>::erase(const_iterator position)
1114
- {
1115
- return table_.erase(position);
1116
- }
1119
+ template <class T, class H, class P, class A>
1120
+ typename unordered_set<T, H, P, A>::iterator unordered_set<T, H, P, A>::erase(
1121
+ const_iterator position)
1122
+ {
1123
+ return table_.erase(position);
1124
+ }
1117
1125
 
1118
- template <class T, class H, class P, class A>
1119
- typename unordered_set<T,H,P,A>::size_type
1120
- unordered_set<T,H,P,A>::erase(const key_type& k)
1121
- {
1122
- return table_.erase_key(k);
1123
- }
1126
+ template <class T, class H, class P, class A>
1127
+ typename unordered_set<T, H, P, A>::size_type unordered_set<T, H, P, A>::erase(
1128
+ const key_type& k)
1129
+ {
1130
+ return table_.erase_key(k);
1131
+ }
1124
1132
 
1125
- template <class T, class H, class P, class A>
1126
- typename unordered_set<T,H,P,A>::iterator
1127
- unordered_set<T,H,P,A>::erase(
1128
- const_iterator first, const_iterator last)
1129
- {
1130
- return table_.erase_range(first, last);
1131
- }
1133
+ template <class T, class H, class P, class A>
1134
+ typename unordered_set<T, H, P, A>::iterator unordered_set<T, H, P, A>::erase(
1135
+ const_iterator first, const_iterator last)
1136
+ {
1137
+ return table_.erase_range(first, last);
1138
+ }
1132
1139
 
1133
- template <class T, class H, class P, class A>
1134
- void unordered_set<T,H,P,A>::clear()
1135
- {
1136
- table_.clear();
1137
- }
1140
+ template <class T, class H, class P, class A>
1141
+ void unordered_set<T, H, P, A>::clear()
1142
+ {
1143
+ table_.clear();
1144
+ }
1138
1145
 
1139
- template <class T, class H, class P, class A>
1140
- void unordered_set<T,H,P,A>::swap(unordered_set& other)
1141
- {
1142
- table_.swap(other.table_);
1143
- }
1146
+ template <class T, class H, class P, class A>
1147
+ void unordered_set<T, H, P, A>::swap(unordered_set& other)
1148
+ {
1149
+ table_.swap(other.table_);
1150
+ }
1144
1151
 
1145
- // observers
1152
+ // observers
1146
1153
 
1147
- template <class T, class H, class P, class A>
1148
- typename unordered_set<T,H,P,A>::hasher
1149
- unordered_set<T,H,P,A>::hash_function() const
1150
- {
1151
- return table_.hash_function();
1152
- }
1154
+ template <class T, class H, class P, class A>
1155
+ typename unordered_set<T, H, P, A>::hasher
1156
+ unordered_set<T, H, P, A>::hash_function() const
1157
+ {
1158
+ return table_.hash_function();
1159
+ }
1153
1160
 
1154
- template <class T, class H, class P, class A>
1155
- typename unordered_set<T,H,P,A>::key_equal
1156
- unordered_set<T,H,P,A>::key_eq() const
1157
- {
1158
- return table_.key_eq();
1159
- }
1161
+ template <class T, class H, class P, class A>
1162
+ typename unordered_set<T, H, P, A>::key_equal
1163
+ unordered_set<T, H, P, A>::key_eq() const
1164
+ {
1165
+ return table_.key_eq();
1166
+ }
1160
1167
 
1161
- // lookup
1168
+ template <class T, class H, class P, class A>
1169
+ template <typename H2, typename P2>
1170
+ void unordered_set<T, H, P, A>::merge(
1171
+ boost::unordered_set<T, H2, P2, A>& source)
1172
+ {
1173
+ table_.merge_impl(source.table_);
1174
+ }
1162
1175
 
1163
- template <class T, class H, class P, class A>
1164
- typename unordered_set<T,H,P,A>::const_iterator
1165
- unordered_set<T,H,P,A>::find(const key_type& k) const
1166
- {
1167
- return table_.find_node(k);
1168
- }
1176
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1177
+ template <class T, class H, class P, class A>
1178
+ template <typename H2, typename P2>
1179
+ void unordered_set<T, H, P, A>::merge(
1180
+ boost::unordered_set<T, H2, P2, A>&& source)
1181
+ {
1182
+ table_.merge_impl(source.table_);
1183
+ }
1184
+ #endif
1169
1185
 
1170
- template <class T, class H, class P, class A>
1171
- template <class CompatibleKey, class CompatibleHash,
1172
- class CompatiblePredicate>
1173
- typename unordered_set<T,H,P,A>::const_iterator
1174
- unordered_set<T,H,P,A>::find(
1175
- CompatibleKey const& k,
1176
- CompatibleHash const& hash,
1177
- CompatiblePredicate const& eq) const
1178
- {
1179
- return table_.generic_find_node(k, hash, eq);
1180
- }
1186
+ #if BOOST_UNORDERED_INTEROPERABLE_NODES
1187
+ template <class T, class H, class P, class A>
1188
+ template <typename H2, typename P2>
1189
+ void unordered_set<T, H, P, A>::merge(
1190
+ boost::unordered_multiset<T, H2, P2, A>& source)
1191
+ {
1192
+ table_.merge_impl(source.table_);
1193
+ }
1181
1194
 
1182
- template <class T, class H, class P, class A>
1183
- typename unordered_set<T,H,P,A>::size_type
1184
- unordered_set<T,H,P,A>::count(const key_type& k) const
1185
- {
1186
- return table_.count(k);
1187
- }
1195
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1196
+ template <class T, class H, class P, class A>
1197
+ template <typename H2, typename P2>
1198
+ void unordered_set<T, H, P, A>::merge(
1199
+ boost::unordered_multiset<T, H2, P2, A>&& source)
1200
+ {
1201
+ table_.merge_impl(source.table_);
1202
+ }
1203
+ #endif
1204
+ #endif
1188
1205
 
1189
- template <class T, class H, class P, class A>
1190
- std::pair<
1191
- typename unordered_set<T,H,P,A>::const_iterator,
1192
- typename unordered_set<T,H,P,A>::const_iterator>
1193
- unordered_set<T,H,P,A>::equal_range(const key_type& k) const
1194
- {
1195
- return table_.equal_range(k);
1196
- }
1206
+ // lookup
1197
1207
 
1198
- template <class T, class H, class P, class A>
1199
- typename unordered_set<T,H,P,A>::size_type
1200
- unordered_set<T,H,P,A>::bucket_size(size_type n) const
1201
- {
1202
- return table_.bucket_size(n);
1203
- }
1208
+ template <class T, class H, class P, class A>
1209
+ typename unordered_set<T, H, P, A>::const_iterator
1210
+ unordered_set<T, H, P, A>::find(const key_type& k) const
1211
+ {
1212
+ return const_iterator(table_.find_node(k));
1213
+ }
1214
+
1215
+ template <class T, class H, class P, class A>
1216
+ template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1217
+ typename unordered_set<T, H, P, A>::const_iterator
1218
+ unordered_set<T, H, P, A>::find(CompatibleKey const& k,
1219
+ CompatibleHash const& hash, CompatiblePredicate const& eq) const
1220
+ {
1221
+ return const_iterator(table_.generic_find_node(k, hash, eq));
1222
+ }
1204
1223
 
1205
- // hash policy
1224
+ template <class T, class H, class P, class A>
1225
+ typename unordered_set<T, H, P, A>::size_type unordered_set<T, H, P, A>::count(
1226
+ const key_type& k) const
1227
+ {
1228
+ return table_.count(k);
1229
+ }
1206
1230
 
1207
- template <class T, class H, class P, class A>
1208
- float unordered_set<T,H,P,A>::load_factor() const BOOST_NOEXCEPT
1209
- {
1210
- return table_.load_factor();
1211
- }
1231
+ template <class T, class H, class P, class A>
1232
+ std::pair<typename unordered_set<T, H, P, A>::const_iterator,
1233
+ typename unordered_set<T, H, P, A>::const_iterator>
1234
+ unordered_set<T, H, P, A>::equal_range(const key_type& k) const
1235
+ {
1236
+ return table_.equal_range(k);
1237
+ }
1212
1238
 
1213
- template <class T, class H, class P, class A>
1214
- void unordered_set<T,H,P,A>::max_load_factor(float m) BOOST_NOEXCEPT
1215
- {
1216
- table_.max_load_factor(m);
1217
- }
1239
+ template <class T, class H, class P, class A>
1240
+ typename unordered_set<T, H, P, A>::size_type
1241
+ unordered_set<T, H, P, A>::bucket_size(size_type n) const
1242
+ {
1243
+ return table_.bucket_size(n);
1244
+ }
1218
1245
 
1219
- template <class T, class H, class P, class A>
1220
- void unordered_set<T,H,P,A>::rehash(size_type n)
1221
- {
1222
- table_.rehash(n);
1223
- }
1246
+ // hash policy
1224
1247
 
1225
- template <class T, class H, class P, class A>
1226
- void unordered_set<T,H,P,A>::reserve(size_type n)
1227
- {
1228
- table_.reserve(n);
1229
- }
1248
+ template <class T, class H, class P, class A>
1249
+ float unordered_set<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
1250
+ {
1251
+ return table_.load_factor();
1252
+ }
1230
1253
 
1231
- template <class T, class H, class P, class A>
1232
- inline bool operator==(
1233
- unordered_set<T,H,P,A> const& m1,
1234
- unordered_set<T,H,P,A> const& m2)
1235
- {
1254
+ template <class T, class H, class P, class A>
1255
+ void unordered_set<T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
1256
+ {
1257
+ table_.max_load_factor(m);
1258
+ }
1259
+
1260
+ template <class T, class H, class P, class A>
1261
+ void unordered_set<T, H, P, A>::rehash(size_type n)
1262
+ {
1263
+ table_.rehash(n);
1264
+ }
1265
+
1266
+ template <class T, class H, class P, class A>
1267
+ void unordered_set<T, H, P, A>::reserve(size_type n)
1268
+ {
1269
+ table_.reserve(n);
1270
+ }
1271
+
1272
+ template <class T, class H, class P, class A>
1273
+ inline bool operator==(
1274
+ unordered_set<T, H, P, A> const& m1, unordered_set<T, H, P, A> const& m2)
1275
+ {
1236
1276
  #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1237
- struct dummy { unordered_set<T,H,P,A> x; };
1277
+ struct dummy
1278
+ {
1279
+ unordered_set<T, H, P, A> x;
1280
+ };
1238
1281
  #endif
1239
- return m1.table_.equals(m2.table_);
1240
- }
1282
+ return m1.table_.equals(m2.table_);
1283
+ }
1241
1284
 
1242
- template <class T, class H, class P, class A>
1243
- inline bool operator!=(
1244
- unordered_set<T,H,P,A> const& m1,
1245
- unordered_set<T,H,P,A> const& m2)
1246
- {
1285
+ template <class T, class H, class P, class A>
1286
+ inline bool operator!=(
1287
+ unordered_set<T, H, P, A> const& m1, unordered_set<T, H, P, A> const& m2)
1288
+ {
1247
1289
  #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1248
- struct dummy { unordered_set<T,H,P,A> x; };
1290
+ struct dummy
1291
+ {
1292
+ unordered_set<T, H, P, A> x;
1293
+ };
1249
1294
  #endif
1250
- return !m1.table_.equals(m2.table_);
1251
- }
1295
+ return !m1.table_.equals(m2.table_);
1296
+ }
1252
1297
 
1253
- template <class T, class H, class P, class A>
1254
- inline void swap(
1255
- unordered_set<T,H,P,A> &m1,
1256
- unordered_set<T,H,P,A> &m2)
1257
- {
1298
+ template <class T, class H, class P, class A>
1299
+ inline void swap(unordered_set<T, H, P, A>& m1, unordered_set<T, H, P, A>& m2)
1300
+ {
1258
1301
  #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1259
- struct dummy { unordered_set<T,H,P,A> x; };
1302
+ struct dummy
1303
+ {
1304
+ unordered_set<T, H, P, A> x;
1305
+ };
1260
1306
  #endif
1261
- m1.swap(m2);
1262
- }
1307
+ m1.swap(m2);
1308
+ }
1263
1309
 
1264
1310
  ////////////////////////////////////////////////////////////////////////////////
1265
1311
 
1266
- template <class T, class H, class P, class A>
1267
- unordered_multiset<T,H,P,A>::unordered_multiset(
1268
- size_type n, const hasher &hf, const key_equal &eql,
1269
- const allocator_type &a)
1270
- : table_(n, hf, eql, a)
1271
- {
1272
- }
1312
+ template <class T, class H, class P, class A>
1313
+ unordered_multiset<T, H, P, A>::unordered_multiset()
1314
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
1315
+ key_equal(), allocator_type())
1316
+ {
1317
+ }
1273
1318
 
1274
- template <class T, class H, class P, class A>
1275
- unordered_multiset<T,H,P,A>::unordered_multiset(allocator_type const& a)
1276
- : table_(boost::unordered::detail::default_bucket_count,
1277
- hasher(), key_equal(), a)
1278
- {
1279
- }
1319
+ template <class T, class H, class P, class A>
1320
+ unordered_multiset<T, H, P, A>::unordered_multiset(size_type n,
1321
+ const hasher& hf, const key_equal& eql, const allocator_type& a)
1322
+ : table_(n, hf, eql, a)
1323
+ {
1324
+ }
1280
1325
 
1281
- template <class T, class H, class P, class A>
1282
- unordered_multiset<T,H,P,A>::unordered_multiset(
1283
- unordered_multiset const& other, allocator_type const& a)
1284
- : table_(other.table_, a)
1285
- {
1286
- }
1326
+ template <class T, class H, class P, class A>
1327
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1328
+ size_type n, const allocator_type& a)
1329
+ : table_(n, hasher(), key_equal(), a)
1330
+ {
1331
+ }
1287
1332
 
1288
- template <class T, class H, class P, class A>
1289
- template <class InputIt>
1290
- unordered_multiset<T,H,P,A>::unordered_multiset(InputIt f, InputIt l)
1291
- : table_(boost::unordered::detail::initial_size(f, l),
1292
- hasher(), key_equal(), allocator_type())
1293
- {
1294
- table_.insert_range(f, l);
1295
- }
1333
+ template <class T, class H, class P, class A>
1334
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1335
+ size_type n, const hasher& hf, const allocator_type& a)
1336
+ : table_(n, hf, key_equal(), a)
1337
+ {
1338
+ }
1296
1339
 
1297
- template <class T, class H, class P, class A>
1298
- template <class InputIt>
1299
- unordered_multiset<T,H,P,A>::unordered_multiset(
1300
- InputIt f, InputIt l,
1301
- size_type n,
1302
- const hasher &hf,
1303
- const key_equal &eql)
1304
- : table_(boost::unordered::detail::initial_size(f, l, n),
1305
- hf, eql, allocator_type())
1306
- {
1307
- table_.insert_range(f, l);
1308
- }
1309
-
1310
- template <class T, class H, class P, class A>
1311
- template <class InputIt>
1312
- unordered_multiset<T,H,P,A>::unordered_multiset(
1313
- InputIt f, InputIt l,
1314
- size_type n,
1315
- const hasher &hf,
1316
- const key_equal &eql,
1317
- const allocator_type &a)
1318
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
1319
- {
1320
- table_.insert_range(f, l);
1321
- }
1322
-
1323
- template <class T, class H, class P, class A>
1324
- unordered_multiset<T,H,P,A>::~unordered_multiset() BOOST_NOEXCEPT {}
1340
+ template <class T, class H, class P, class A>
1341
+ unordered_multiset<T, H, P, A>::unordered_multiset(allocator_type const& a)
1342
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
1343
+ key_equal(), a)
1344
+ {
1345
+ }
1325
1346
 
1326
- template <class T, class H, class P, class A>
1327
- unordered_multiset<T,H,P,A>::unordered_multiset(
1328
- unordered_multiset const& other)
1329
- : table_(other.table_)
1330
- {
1331
- }
1347
+ template <class T, class H, class P, class A>
1348
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1349
+ unordered_multiset const& other, allocator_type const& a)
1350
+ : table_(other.table_, a)
1351
+ {
1352
+ }
1332
1353
 
1333
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1354
+ template <class T, class H, class P, class A>
1355
+ template <class InputIt>
1356
+ unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l)
1357
+ : table_(boost::unordered::detail::initial_size(f, l), hasher(),
1358
+ key_equal(), allocator_type())
1359
+ {
1360
+ table_.insert_range(f, l);
1361
+ }
1362
+
1363
+ template <class T, class H, class P, class A>
1364
+ template <class InputIt>
1365
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1366
+ InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
1367
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
1368
+ allocator_type())
1369
+ {
1370
+ table_.insert_range(f, l);
1371
+ }
1372
+
1373
+ template <class T, class H, class P, class A>
1374
+ template <class InputIt>
1375
+ unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l,
1376
+ size_type n, const hasher& hf, const key_equal& eql,
1377
+ const allocator_type& a)
1378
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
1379
+ {
1380
+ table_.insert_range(f, l);
1381
+ }
1382
+
1383
+ template <class T, class H, class P, class A>
1384
+ template <class InputIt>
1385
+ unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l,
1386
+ size_type n, const hasher& hf, const allocator_type& a)
1387
+ : table_(
1388
+ boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
1389
+ {
1390
+ table_.insert_range(f, l);
1391
+ }
1392
+
1393
+ template <class T, class H, class P, class A>
1394
+ template <class InputIt>
1395
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1396
+ InputIt f, InputIt l, size_type n, const allocator_type& a)
1397
+ : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
1398
+ key_equal(), a)
1399
+ {
1400
+ table_.insert_range(f, l);
1401
+ }
1334
1402
 
1335
- template <class T, class H, class P, class A>
1336
- unordered_multiset<T,H,P,A>::unordered_multiset(
1337
- unordered_multiset&& other, allocator_type const& a)
1338
- : table_(other.table_, a, boost::unordered::detail::move_tag())
1339
- {
1340
- }
1403
+ template <class T, class H, class P, class A>
1404
+ unordered_multiset<T, H, P, A>::~unordered_multiset() BOOST_NOEXCEPT
1405
+ {
1406
+ }
1341
1407
 
1342
- #endif
1408
+ template <class T, class H, class P, class A>
1409
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1410
+ unordered_multiset const& other)
1411
+ : table_(other.table_)
1412
+ {
1413
+ }
1414
+
1415
+ template <class T, class H, class P, class A>
1416
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1417
+ BOOST_RV_REF(unordered_multiset) other, allocator_type const& a)
1418
+ : table_(other.table_, a, boost::unordered::detail::move_tag())
1419
+ {
1420
+ }
1343
1421
 
1344
1422
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1345
1423
 
1346
- template <class T, class H, class P, class A>
1347
- unordered_multiset<T,H,P,A>::unordered_multiset(
1348
- std::initializer_list<value_type> list, size_type n,
1349
- const hasher &hf, const key_equal &eql, const allocator_type &a)
1350
- : table_(
1351
- boost::unordered::detail::initial_size(
1352
- list.begin(), list.end(), n),
1353
- hf, eql, a)
1354
- {
1355
- table_.insert_range(list.begin(), list.end());
1356
- }
1424
+ template <class T, class H, class P, class A>
1425
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1426
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
1427
+ const key_equal& eql, const allocator_type& a)
1428
+ : table_(
1429
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1430
+ hf, eql, a)
1431
+ {
1432
+ table_.insert_range(list.begin(), list.end());
1433
+ }
1434
+
1435
+ template <class T, class H, class P, class A>
1436
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1437
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
1438
+ const allocator_type& a)
1439
+ : table_(
1440
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1441
+ hf, key_equal(), a)
1442
+ {
1443
+ table_.insert_range(list.begin(), list.end());
1444
+ }
1445
+
1446
+ template <class T, class H, class P, class A>
1447
+ unordered_multiset<T, H, P, A>::unordered_multiset(
1448
+ std::initializer_list<value_type> list, size_type n,
1449
+ const allocator_type& a)
1450
+ : table_(
1451
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1452
+ hasher(), key_equal(), a)
1453
+ {
1454
+ table_.insert_range(list.begin(), list.end());
1455
+ }
1357
1456
 
1358
- template <class T, class H, class P, class A>
1359
- unordered_multiset<T,H,P,A>& unordered_multiset<T,H,P,A>::operator=(
1360
- std::initializer_list<value_type> list)
1361
- {
1362
- table_.clear();
1363
- table_.insert_range(list.begin(), list.end());
1364
- return *this;
1365
- }
1457
+ template <class T, class H, class P, class A>
1458
+ unordered_multiset<T, H, P, A>& unordered_multiset<T, H, P, A>::operator=(
1459
+ std::initializer_list<value_type> list)
1460
+ {
1461
+ table_.clear();
1462
+ table_.insert_range(list.begin(), list.end());
1463
+ return *this;
1464
+ }
1366
1465
 
1367
1466
  #endif
1368
1467
 
1369
- // size and capacity
1468
+ // size and capacity
1370
1469
 
1371
- template <class T, class H, class P, class A>
1372
- std::size_t unordered_multiset<T,H,P,A>::max_size() const BOOST_NOEXCEPT
1373
- {
1374
- return table_.max_size();
1375
- }
1470
+ template <class T, class H, class P, class A>
1471
+ std::size_t unordered_multiset<T, H, P, A>::max_size() const BOOST_NOEXCEPT
1472
+ {
1473
+ return table_.max_size();
1474
+ }
1376
1475
 
1377
- // modifiers
1476
+ // modifiers
1378
1477
 
1379
- template <class T, class H, class P, class A>
1380
- template <class InputIt>
1381
- void unordered_multiset<T,H,P,A>::insert(InputIt first, InputIt last)
1382
- {
1383
- table_.insert_range(first, last);
1384
- }
1478
+ template <class T, class H, class P, class A>
1479
+ template <class InputIt>
1480
+ void unordered_multiset<T, H, P, A>::insert(InputIt first, InputIt last)
1481
+ {
1482
+ table_.insert_range(first, last);
1483
+ }
1385
1484
 
1386
1485
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1387
- template <class T, class H, class P, class A>
1388
- void unordered_multiset<T,H,P,A>::insert(
1389
- std::initializer_list<value_type> list)
1390
- {
1391
- table_.insert_range(list.begin(), list.end());
1392
- }
1486
+ template <class T, class H, class P, class A>
1487
+ void unordered_multiset<T, H, P, A>::insert(
1488
+ std::initializer_list<value_type> list)
1489
+ {
1490
+ table_.insert_range(list.begin(), list.end());
1491
+ }
1393
1492
  #endif
1394
1493
 
1395
- template <class T, class H, class P, class A>
1396
- typename unordered_multiset<T,H,P,A>::iterator
1397
- unordered_multiset<T,H,P,A>::erase(const_iterator position)
1398
- {
1399
- return table_.erase(position);
1400
- }
1494
+ template <class T, class H, class P, class A>
1495
+ typename unordered_multiset<T, H, P, A>::iterator
1496
+ unordered_multiset<T, H, P, A>::erase(const_iterator position)
1497
+ {
1498
+ return table_.erase(position);
1499
+ }
1401
1500
 
1402
- template <class T, class H, class P, class A>
1403
- typename unordered_multiset<T,H,P,A>::size_type
1404
- unordered_multiset<T,H,P,A>::erase(const key_type& k)
1405
- {
1406
- return table_.erase_key(k);
1501
+ template <class T, class H, class P, class A>
1502
+ typename unordered_multiset<T, H, P, A>::size_type
1503
+ unordered_multiset<T, H, P, A>::erase(const key_type& k)
1504
+ {
1505
+ return table_.erase_key(k);
1506
+ }
1507
+
1508
+ template <class T, class H, class P, class A>
1509
+ typename unordered_multiset<T, H, P, A>::iterator
1510
+ unordered_multiset<T, H, P, A>::erase(const_iterator first, const_iterator last)
1511
+ {
1512
+ return table_.erase_range(first, last);
1513
+ }
1514
+
1515
+ template <class T, class H, class P, class A>
1516
+ void unordered_multiset<T, H, P, A>::clear()
1517
+ {
1518
+ table_.clear();
1519
+ }
1520
+
1521
+ template <class T, class H, class P, class A>
1522
+ void unordered_multiset<T, H, P, A>::swap(unordered_multiset& other)
1523
+ {
1524
+ table_.swap(other.table_);
1525
+ }
1526
+
1527
+ // observers
1528
+
1529
+ template <class T, class H, class P, class A>
1530
+ typename unordered_multiset<T, H, P, A>::hasher
1531
+ unordered_multiset<T, H, P, A>::hash_function() const
1532
+ {
1533
+ return table_.hash_function();
1534
+ }
1535
+
1536
+ template <class T, class H, class P, class A>
1537
+ typename unordered_multiset<T, H, P, A>::key_equal
1538
+ unordered_multiset<T, H, P, A>::key_eq() const
1539
+ {
1540
+ return table_.key_eq();
1541
+ }
1542
+
1543
+ template <class T, class H, class P, class A>
1544
+ template <typename H2, typename P2>
1545
+ void unordered_multiset<T, H, P, A>::merge(
1546
+ boost::unordered_multiset<T, H2, P2, A>& source)
1547
+ {
1548
+ while (!source.empty()) {
1549
+ insert(source.extract(source.begin()));
1407
1550
  }
1551
+ }
1408
1552
 
1409
- template <class T, class H, class P, class A>
1410
- typename unordered_multiset<T,H,P,A>::iterator
1411
- unordered_multiset<T,H,P,A>::erase(
1412
- const_iterator first, const_iterator last)
1413
- {
1414
- return table_.erase_range(first, last);
1553
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1554
+ template <class T, class H, class P, class A>
1555
+ template <typename H2, typename P2>
1556
+ void unordered_multiset<T, H, P, A>::merge(
1557
+ boost::unordered_multiset<T, H2, P2, A>&& source)
1558
+ {
1559
+ while (!source.empty()) {
1560
+ insert(source.extract(source.begin()));
1415
1561
  }
1562
+ }
1563
+ #endif
1416
1564
 
1417
- template <class T, class H, class P, class A>
1418
- void unordered_multiset<T,H,P,A>::clear()
1419
- {
1420
- table_.clear();
1565
+ #if BOOST_UNORDERED_INTEROPERABLE_NODES
1566
+ template <class T, class H, class P, class A>
1567
+ template <typename H2, typename P2>
1568
+ void unordered_multiset<T, H, P, A>::merge(
1569
+ boost::unordered_set<T, H2, P2, A>& source)
1570
+ {
1571
+ while (!source.empty()) {
1572
+ insert(source.extract(source.begin()));
1421
1573
  }
1574
+ }
1422
1575
 
1423
- template <class T, class H, class P, class A>
1424
- void unordered_multiset<T,H,P,A>::swap(unordered_multiset& other)
1425
- {
1426
- table_.swap(other.table_);
1576
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1577
+ template <class T, class H, class P, class A>
1578
+ template <typename H2, typename P2>
1579
+ void unordered_multiset<T, H, P, A>::merge(
1580
+ boost::unordered_set<T, H2, P2, A>&& source)
1581
+ {
1582
+ while (!source.empty()) {
1583
+ insert(source.extract(source.begin()));
1427
1584
  }
1585
+ }
1586
+ #endif
1587
+ #endif
1428
1588
 
1429
- // observers
1589
+ // lookup
1590
+
1591
+ template <class T, class H, class P, class A>
1592
+ typename unordered_multiset<T, H, P, A>::const_iterator
1593
+ unordered_multiset<T, H, P, A>::find(const key_type& k) const
1594
+ {
1595
+ return const_iterator(table_.find_node(k));
1596
+ }
1597
+
1598
+ template <class T, class H, class P, class A>
1599
+ template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1600
+ typename unordered_multiset<T, H, P, A>::const_iterator
1601
+ unordered_multiset<T, H, P, A>::find(CompatibleKey const& k,
1602
+ CompatibleHash const& hash, CompatiblePredicate const& eq) const
1603
+ {
1604
+ return const_iterator(table_.generic_find_node(k, hash, eq));
1605
+ }
1606
+
1607
+ template <class T, class H, class P, class A>
1608
+ typename unordered_multiset<T, H, P, A>::size_type
1609
+ unordered_multiset<T, H, P, A>::count(const key_type& k) const
1610
+ {
1611
+ return table_.count(k);
1612
+ }
1613
+
1614
+ template <class T, class H, class P, class A>
1615
+ std::pair<typename unordered_multiset<T, H, P, A>::const_iterator,
1616
+ typename unordered_multiset<T, H, P, A>::const_iterator>
1617
+ unordered_multiset<T, H, P, A>::equal_range(const key_type& k) const
1618
+ {
1619
+ return table_.equal_range(k);
1620
+ }
1621
+
1622
+ template <class T, class H, class P, class A>
1623
+ typename unordered_multiset<T, H, P, A>::size_type
1624
+ unordered_multiset<T, H, P, A>::bucket_size(size_type n) const
1625
+ {
1626
+ return table_.bucket_size(n);
1627
+ }
1628
+
1629
+ // hash policy
1630
+
1631
+ template <class T, class H, class P, class A>
1632
+ float unordered_multiset<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
1633
+ {
1634
+ return table_.load_factor();
1635
+ }
1636
+
1637
+ template <class T, class H, class P, class A>
1638
+ void unordered_multiset<T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
1639
+ {
1640
+ table_.max_load_factor(m);
1641
+ }
1642
+
1643
+ template <class T, class H, class P, class A>
1644
+ void unordered_multiset<T, H, P, A>::rehash(size_type n)
1645
+ {
1646
+ table_.rehash(n);
1647
+ }
1648
+
1649
+ template <class T, class H, class P, class A>
1650
+ void unordered_multiset<T, H, P, A>::reserve(size_type n)
1651
+ {
1652
+ table_.reserve(n);
1653
+ }
1654
+
1655
+ template <class T, class H, class P, class A>
1656
+ inline bool operator==(unordered_multiset<T, H, P, A> const& m1,
1657
+ unordered_multiset<T, H, P, A> const& m2)
1658
+ {
1659
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1660
+ struct dummy
1661
+ {
1662
+ unordered_multiset<T, H, P, A> x;
1663
+ };
1664
+ #endif
1665
+ return m1.table_.equals(m2.table_);
1666
+ }
1430
1667
 
1431
- template <class T, class H, class P, class A>
1432
- typename unordered_multiset<T,H,P,A>::hasher
1433
- unordered_multiset<T,H,P,A>::hash_function() const
1668
+ template <class T, class H, class P, class A>
1669
+ inline bool operator!=(unordered_multiset<T, H, P, A> const& m1,
1670
+ unordered_multiset<T, H, P, A> const& m2)
1671
+ {
1672
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1673
+ struct dummy
1434
1674
  {
1435
- return table_.hash_function();
1436
- }
1675
+ unordered_multiset<T, H, P, A> x;
1676
+ };
1677
+ #endif
1678
+ return !m1.table_.equals(m2.table_);
1679
+ }
1437
1680
 
1438
- template <class T, class H, class P, class A>
1439
- typename unordered_multiset<T,H,P,A>::key_equal
1440
- unordered_multiset<T,H,P,A>::key_eq() const
1681
+ template <class T, class H, class P, class A>
1682
+ inline void swap(
1683
+ unordered_multiset<T, H, P, A>& m1, unordered_multiset<T, H, P, A>& m2)
1684
+ {
1685
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1686
+ struct dummy
1441
1687
  {
1442
- return table_.key_eq();
1443
- }
1688
+ unordered_multiset<T, H, P, A> x;
1689
+ };
1690
+ #endif
1691
+ m1.swap(m2);
1692
+ }
1444
1693
 
1445
- // lookup
1694
+ template <typename N, typename T, typename A> class node_handle_set
1695
+ {
1696
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_set)
1697
+
1698
+ template <typename Types>
1699
+ friend struct ::boost::unordered::detail::table_impl;
1700
+ template <typename Types>
1701
+ friend struct ::boost::unordered::detail::grouped_table_impl;
1446
1702
 
1447
- template <class T, class H, class P, class A>
1448
- typename unordered_multiset<T,H,P,A>::const_iterator
1449
- unordered_multiset<T,H,P,A>::find(const key_type& k) const
1703
+ typedef typename boost::unordered::detail::rebind_wrap<A, T>::type
1704
+ value_allocator;
1705
+ typedef boost::unordered::detail::allocator_traits<value_allocator>
1706
+ value_allocator_traits;
1707
+ typedef N node;
1708
+ typedef typename boost::unordered::detail::rebind_wrap<A, node>::type
1709
+ node_allocator;
1710
+ typedef boost::unordered::detail::allocator_traits<node_allocator>
1711
+ node_allocator_traits;
1712
+ typedef typename node_allocator_traits::pointer node_pointer;
1713
+
1714
+ public:
1715
+ typedef T value_type;
1716
+ typedef A allocator_type;
1717
+
1718
+ private:
1719
+ node_pointer ptr_;
1720
+ bool has_alloc_;
1721
+ boost::unordered::detail::value_base<value_allocator> alloc_;
1722
+
1723
+ public:
1724
+ BOOST_CONSTEXPR node_handle_set() BOOST_NOEXCEPT : ptr_(), has_alloc_(false)
1450
1725
  {
1451
- return table_.find_node(k);
1452
1726
  }
1453
1727
 
1454
- template <class T, class H, class P, class A>
1455
- template <class CompatibleKey, class CompatibleHash,
1456
- class CompatiblePredicate>
1457
- typename unordered_multiset<T,H,P,A>::const_iterator
1458
- unordered_multiset<T,H,P,A>::find(
1459
- CompatibleKey const& k,
1460
- CompatibleHash const& hash,
1461
- CompatiblePredicate const& eq) const
1728
+ /*BOOST_CONSTEXPR */ node_handle_set(
1729
+ node_pointer ptr, allocator_type const& a)
1730
+ : ptr_(ptr), has_alloc_(false)
1462
1731
  {
1463
- return table_.generic_find_node(k, hash, eq);
1732
+ if (ptr_) {
1733
+ new ((void*)&alloc_) value_allocator(a);
1734
+ has_alloc_ = true;
1735
+ }
1464
1736
  }
1465
1737
 
1466
- template <class T, class H, class P, class A>
1467
- typename unordered_multiset<T,H,P,A>::size_type
1468
- unordered_multiset<T,H,P,A>::count(const key_type& k) const
1738
+ ~node_handle_set()
1469
1739
  {
1470
- return table_.count(k);
1740
+ if (has_alloc_ && ptr_) {
1741
+ node_allocator node_alloc(alloc_.value());
1742
+ boost::unordered::detail::node_tmp<node_allocator> tmp(
1743
+ ptr_, node_alloc);
1744
+ }
1745
+ if (has_alloc_) {
1746
+ alloc_.value_ptr()->~value_allocator();
1747
+ }
1471
1748
  }
1472
1749
 
1473
- template <class T, class H, class P, class A>
1474
- std::pair<
1475
- typename unordered_multiset<T,H,P,A>::const_iterator,
1476
- typename unordered_multiset<T,H,P,A>::const_iterator>
1477
- unordered_multiset<T,H,P,A>::equal_range(const key_type& k) const
1750
+ node_handle_set(BOOST_RV_REF(node_handle_set) n) BOOST_NOEXCEPT
1751
+ : ptr_(n.ptr_),
1752
+ has_alloc_(false)
1478
1753
  {
1479
- return table_.equal_range(k);
1754
+ if (n.has_alloc_) {
1755
+ new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
1756
+ has_alloc_ = true;
1757
+ n.ptr_ = node_pointer();
1758
+ n.alloc_.value_ptr()->~value_allocator();
1759
+ n.has_alloc_ = false;
1760
+ }
1480
1761
  }
1481
1762
 
1482
- template <class T, class H, class P, class A>
1483
- typename unordered_multiset<T,H,P,A>::size_type
1484
- unordered_multiset<T,H,P,A>::bucket_size(size_type n) const
1763
+ node_handle_set& operator=(BOOST_RV_REF(node_handle_set) n)
1485
1764
  {
1486
- return table_.bucket_size(n);
1487
- }
1765
+ BOOST_ASSERT(!has_alloc_ ||
1766
+ value_allocator_traits::
1767
+ propagate_on_container_move_assignment::value ||
1768
+ (n.has_alloc_ && alloc_.value() == n.alloc_.value()));
1488
1769
 
1489
- // hash policy
1770
+ if (ptr_) {
1771
+ node_allocator node_alloc(alloc_.value());
1772
+ boost::unordered::detail::node_tmp<node_allocator> tmp(
1773
+ ptr_, node_alloc);
1774
+ ptr_ = node_pointer();
1775
+ }
1490
1776
 
1491
- template <class T, class H, class P, class A>
1492
- float unordered_multiset<T,H,P,A>::load_factor() const BOOST_NOEXCEPT
1493
- {
1494
- return table_.load_factor();
1495
- }
1777
+ if (has_alloc_) {
1778
+ alloc_.value_ptr()->~value_allocator();
1779
+ has_alloc_ = false;
1780
+ }
1496
1781
 
1497
- template <class T, class H, class P, class A>
1498
- void unordered_multiset<T,H,P,A>::max_load_factor(float m) BOOST_NOEXCEPT
1499
- {
1500
- table_.max_load_factor(m);
1782
+ if (!has_alloc_ && n.has_alloc_) {
1783
+ move_allocator(n);
1784
+ }
1785
+
1786
+ ptr_ = n.ptr_;
1787
+ n.ptr_ = node_pointer();
1788
+
1789
+ return *this;
1501
1790
  }
1502
1791
 
1503
- template <class T, class H, class P, class A>
1504
- void unordered_multiset<T,H,P,A>::rehash(size_type n)
1792
+ value_type& value() const { return ptr_->value(); }
1793
+
1794
+ allocator_type get_allocator() const { return alloc_.value(); }
1795
+
1796
+ BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
1797
+
1798
+ bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
1799
+
1800
+ bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
1801
+
1802
+ void swap(node_handle_set& n) BOOST_NOEXCEPT_IF(
1803
+ value_allocator_traits::propagate_on_container_swap::value
1804
+ /* || value_allocator_traits::is_always_equal::value */)
1505
1805
  {
1506
- table_.rehash(n);
1806
+ if (!has_alloc_) {
1807
+ if (n.has_alloc_) {
1808
+ move_allocator(n);
1809
+ }
1810
+ } else if (!n.has_alloc_) {
1811
+ n.move_allocator(*this);
1812
+ } else {
1813
+ swap_impl(n, boost::unordered::detail::integral_constant<bool,
1814
+ value_allocator_traits::
1815
+ propagate_on_container_swap::value>());
1816
+ }
1817
+ boost::swap(ptr_, n.ptr_);
1507
1818
  }
1508
1819
 
1509
- template <class T, class H, class P, class A>
1510
- void unordered_multiset<T,H,P,A>::reserve(size_type n)
1820
+ private:
1821
+ void move_allocator(node_handle_set& n)
1511
1822
  {
1512
- table_.reserve(n);
1823
+ new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
1824
+ n.alloc_.value_ptr()->~value_allocator();
1825
+ has_alloc_ = true;
1826
+ n.has_alloc_ = false;
1513
1827
  }
1514
1828
 
1515
- template <class T, class H, class P, class A>
1516
- inline bool operator==(
1517
- unordered_multiset<T,H,P,A> const& m1,
1518
- unordered_multiset<T,H,P,A> const& m2)
1829
+ void swap_impl(node_handle_set&, boost::unordered::detail::false_type) {}
1830
+
1831
+ void swap_impl(node_handle_set& n, boost::unordered::detail::true_type)
1519
1832
  {
1520
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1521
- struct dummy { unordered_multiset<T,H,P,A> x; };
1522
- #endif
1523
- return m1.table_.equals(m2.table_);
1833
+ boost::swap(alloc_, n.alloc_);
1524
1834
  }
1835
+ };
1836
+
1837
+ template <typename N, typename T, typename A>
1838
+ void swap(node_handle_set<N, T, A>& x, node_handle_set<N, T, A>& y)
1839
+ BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(x.swap(y)))
1840
+ {
1841
+ x.swap(y);
1842
+ }
1843
+
1844
+ template <typename N, typename T, typename A> struct insert_return_type_set
1845
+ {
1846
+ private:
1847
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_set)
1848
+
1849
+ typedef typename boost::unordered::detail::rebind_wrap<A, T>::type
1850
+ value_allocator;
1851
+ typedef N node_;
1525
1852
 
1526
- template <class T, class H, class P, class A>
1527
- inline bool operator!=(
1528
- unordered_multiset<T,H,P,A> const& m1,
1529
- unordered_multiset<T,H,P,A> const& m2)
1853
+ public:
1854
+ bool inserted;
1855
+ boost::unordered::iterator_detail::c_iterator<node_> position;
1856
+ boost::unordered::node_handle_set<N, T, A> node;
1857
+
1858
+ insert_return_type_set() : inserted(false), position(), node() {}
1859
+
1860
+ insert_return_type_set(BOOST_RV_REF(insert_return_type_set)
1861
+ x) BOOST_NOEXCEPT : inserted(x.inserted),
1862
+ position(x.position),
1863
+ node(boost::move(x.node))
1530
1864
  {
1531
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1532
- struct dummy { unordered_multiset<T,H,P,A> x; };
1533
- #endif
1534
- return !m1.table_.equals(m2.table_);
1535
1865
  }
1536
1866
 
1537
- template <class T, class H, class P, class A>
1538
- inline void swap(
1539
- unordered_multiset<T,H,P,A> &m1,
1540
- unordered_multiset<T,H,P,A> &m2)
1867
+ insert_return_type_set& operator=(BOOST_RV_REF(insert_return_type_set) x)
1541
1868
  {
1542
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1543
- struct dummy { unordered_multiset<T,H,P,A> x; };
1544
- #endif
1545
- m1.swap(m2);
1869
+ inserted = x.inserted;
1870
+ position = x.position;
1871
+ node = boost::move(x.node);
1872
+ return *this;
1546
1873
  }
1874
+ };
1875
+
1876
+ template <typename N, typename T, typename A>
1877
+ void swap(
1878
+ insert_return_type_set<N, T, A>& x, insert_return_type_set<N, T, A>& y)
1879
+ {
1880
+ boost::swap(x.node, y.node);
1881
+ boost::swap(x.inserted, y.inserted);
1882
+ boost::swap(x.position, y.position);
1883
+ }
1547
1884
  } // namespace unordered
1548
1885
  } // namespace boost
1549
1886