webruby 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webruby/config.rb +4 -9
  3. data/lib/webruby/rake/files.rake +2 -2
  4. data/modules/emscripten/AUTHORS +9 -1
  5. data/modules/emscripten/CONTRIBUTING.markdown +5 -0
  6. data/modules/emscripten/ChangeLog +435 -0
  7. data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +26 -0
  8. data/modules/emscripten/cmake/Platform/Emscripten.cmake +9 -2
  9. data/modules/emscripten/em++ +0 -2
  10. data/modules/emscripten/emcc +92 -32
  11. data/modules/emscripten/emlink.py +16 -13
  12. data/modules/emscripten/emmake +1 -1
  13. data/modules/emscripten/emrun +918 -0
  14. data/modules/emscripten/emrun.bat +2 -0
  15. data/modules/emscripten/emscripten.py +545 -20
  16. data/modules/emscripten/src/analyzer.js +6 -1
  17. data/modules/emscripten/src/compiler.js +25 -16
  18. data/modules/emscripten/src/emrun_postjs.js +20 -0
  19. data/modules/emscripten/{tests → src}/hello_world.js +0 -0
  20. data/modules/emscripten/src/intertyper.js +45 -16
  21. data/modules/emscripten/src/jsifier.js +78 -48
  22. data/modules/emscripten/src/library.js +381 -96
  23. data/modules/emscripten/src/library_browser.js +50 -53
  24. data/modules/emscripten/src/library_egl.js +66 -24
  25. data/modules/emscripten/src/library_fs.js +122 -90
  26. data/modules/emscripten/src/library_gl.js +739 -353
  27. data/modules/emscripten/src/library_glfw.js +9 -3
  28. data/modules/emscripten/src/library_glut.js +10 -5
  29. data/modules/emscripten/src/library_idbfs.js +14 -14
  30. data/modules/emscripten/src/library_memfs.js +65 -41
  31. data/modules/emscripten/src/library_nodefs.js +61 -9
  32. data/modules/emscripten/src/library_openal.js +4 -4
  33. data/modules/emscripten/src/library_path.js +9 -13
  34. data/modules/emscripten/src/library_sdl.js +301 -64
  35. data/modules/emscripten/src/library_sockfs.js +7 -5
  36. data/modules/emscripten/src/modules.js +62 -22
  37. data/modules/emscripten/src/parseTools.js +135 -102
  38. data/modules/emscripten/src/postamble.js +3 -4
  39. data/modules/emscripten/src/preamble.js +49 -29
  40. data/modules/emscripten/src/proxyClient.js +1 -1
  41. data/modules/emscripten/src/proxyWorker.js +10 -10
  42. data/modules/emscripten/src/relooper/Relooper.cpp +15 -4
  43. data/modules/emscripten/src/runtime.js +32 -8
  44. data/modules/emscripten/src/settings.js +25 -8
  45. data/modules/emscripten/src/shell.html +6 -3
  46. data/modules/emscripten/src/shell.js +13 -11
  47. data/modules/emscripten/src/simd.js +602 -432
  48. data/modules/emscripten/src/struct_info.json +22 -2
  49. data/modules/emscripten/src/utility.js +32 -17
  50. data/modules/emscripten/system/include/SDL/SDL_events.h +1 -0
  51. data/modules/emscripten/system/include/compat/ctype.h +17 -0
  52. data/modules/emscripten/system/include/compat/wchar.h +23 -0
  53. data/modules/emscripten/system/include/compat/wctype.h +23 -0
  54. data/modules/emscripten/system/include/emscripten/emmintrin.h +87 -0
  55. data/modules/emscripten/system/include/emscripten/emscripten.h +30 -4
  56. data/modules/emscripten/system/include/emscripten/vector.h +29 -1
  57. data/modules/emscripten/system/include/emscripten/xmmintrin.h +131 -0
  58. data/modules/emscripten/system/include/libcxx/CREDITS.TXT +9 -1
  59. data/modules/emscripten/system/include/libcxx/__bit_reference +8 -8
  60. data/modules/emscripten/system/include/libcxx/__config +95 -17
  61. data/modules/emscripten/system/include/libcxx/__debug +25 -4
  62. data/modules/emscripten/system/include/libcxx/__functional_03 +7 -7
  63. data/modules/emscripten/system/include/libcxx/__functional_base +169 -9
  64. data/modules/emscripten/system/include/libcxx/__functional_base_03 +1 -1
  65. data/modules/emscripten/system/include/libcxx/__hash_table +25 -25
  66. data/modules/emscripten/system/include/libcxx/__locale +21 -19
  67. data/modules/emscripten/system/include/libcxx/__mutex_base +2 -33
  68. data/modules/emscripten/system/include/libcxx/__split_buffer +9 -9
  69. data/modules/emscripten/system/include/libcxx/__std_stream +14 -0
  70. data/modules/emscripten/system/include/libcxx/__tree +35 -26
  71. data/modules/emscripten/system/include/libcxx/__tuple +15 -15
  72. data/modules/emscripten/system/include/libcxx/__tuple_03 +2 -2
  73. data/modules/emscripten/system/include/libcxx/__undef_min_max +8 -0
  74. data/modules/emscripten/system/include/libcxx/algorithm +121 -110
  75. data/modules/emscripten/system/include/libcxx/array +15 -15
  76. data/modules/emscripten/system/include/libcxx/bitset +4 -4
  77. data/modules/emscripten/system/include/libcxx/chrono +51 -17
  78. data/modules/emscripten/system/include/libcxx/cmath +25 -23
  79. data/modules/emscripten/system/include/libcxx/codecvt +21 -18
  80. data/modules/emscripten/system/include/libcxx/complex +48 -7
  81. data/modules/emscripten/system/include/libcxx/cstddef +1 -1
  82. data/modules/emscripten/system/include/libcxx/cstdio +8 -1
  83. data/modules/emscripten/system/include/libcxx/cstdlib +1 -1
  84. data/modules/emscripten/system/include/libcxx/cwchar +1 -1
  85. data/modules/emscripten/system/include/libcxx/deque +26 -12
  86. data/modules/emscripten/system/include/libcxx/dynarray +311 -0
  87. data/modules/emscripten/system/include/libcxx/exception +4 -4
  88. data/modules/emscripten/system/include/libcxx/ext/__hash +3 -3
  89. data/modules/emscripten/system/include/libcxx/ext/hash_map +19 -15
  90. data/modules/emscripten/system/include/libcxx/ext/hash_set +7 -3
  91. data/modules/emscripten/system/include/libcxx/forward_list +33 -7
  92. data/modules/emscripten/system/include/libcxx/fstream +4 -4
  93. data/modules/emscripten/system/include/libcxx/functional +200 -170
  94. data/modules/emscripten/system/include/libcxx/future +83 -39
  95. data/modules/emscripten/system/include/libcxx/initializer_list +24 -11
  96. data/modules/emscripten/system/include/libcxx/iomanip +147 -0
  97. data/modules/emscripten/system/include/libcxx/ios +24 -16
  98. data/modules/emscripten/system/include/libcxx/iosfwd +19 -19
  99. data/modules/emscripten/system/include/libcxx/istream +13 -8
  100. data/modules/emscripten/system/include/libcxx/iterator +108 -417
  101. data/modules/emscripten/system/include/libcxx/limits +8 -4
  102. data/modules/emscripten/system/include/libcxx/list +28 -8
  103. data/modules/emscripten/system/include/libcxx/locale +153 -390
  104. data/modules/emscripten/system/include/libcxx/map +280 -100
  105. data/modules/emscripten/system/include/libcxx/memory +49 -97
  106. data/modules/emscripten/system/include/libcxx/mutex +2 -2
  107. data/modules/emscripten/system/include/libcxx/new +43 -14
  108. data/modules/emscripten/system/include/libcxx/numeric +2 -2
  109. data/modules/emscripten/system/include/libcxx/optional +697 -0
  110. data/modules/emscripten/system/include/libcxx/ostream +17 -8
  111. data/modules/emscripten/system/include/libcxx/queue +5 -5
  112. data/modules/emscripten/system/include/libcxx/random +53 -51
  113. data/modules/emscripten/system/include/libcxx/ratio +11 -11
  114. data/modules/emscripten/system/include/libcxx/readme.txt +1 -1
  115. data/modules/emscripten/system/include/libcxx/regex +23 -20
  116. data/modules/emscripten/system/include/libcxx/scoped_allocator +1 -1
  117. data/modules/emscripten/system/include/libcxx/set +166 -2
  118. data/modules/emscripten/system/include/libcxx/shared_mutex +419 -0
  119. data/modules/emscripten/system/include/libcxx/sstream +4 -4
  120. data/modules/emscripten/system/include/libcxx/stack +3 -3
  121. data/modules/emscripten/system/include/libcxx/streambuf +5 -5
  122. data/modules/emscripten/system/include/libcxx/string +372 -324
  123. data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +99 -0
  124. data/modules/emscripten/system/include/libcxx/support/ibm/support.h +54 -0
  125. data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +326 -0
  126. data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +6 -6
  127. data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +15 -15
  128. data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +2 -0
  129. data/modules/emscripten/system/include/libcxx/support/win32/support.h +6 -1
  130. data/modules/emscripten/system/include/libcxx/system_error +14 -8
  131. data/modules/emscripten/system/include/libcxx/thread +7 -8
  132. data/modules/emscripten/system/include/libcxx/tuple +29 -88
  133. data/modules/emscripten/system/include/libcxx/type_traits +253 -209
  134. data/modules/emscripten/system/include/libcxx/typeindex +3 -3
  135. data/modules/emscripten/system/include/libcxx/unordered_map +162 -101
  136. data/modules/emscripten/system/include/libcxx/unordered_set +79 -2
  137. data/modules/emscripten/system/include/libcxx/utility +20 -20
  138. data/modules/emscripten/system/include/libcxx/valarray +23 -23
  139. data/modules/emscripten/system/include/libcxx/vector +114 -91
  140. data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +3352 -0
  141. data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +35 -0
  142. data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +1011 -0
  143. data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +158 -0
  144. data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +231 -0
  145. data/modules/emscripten/system/lib/libcextra.symbols +7 -0
  146. data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +9 -1
  147. data/modules/emscripten/system/lib/libcxx/algorithm.cpp +1 -0
  148. data/modules/emscripten/system/lib/libcxx/debug.cpp +66 -42
  149. data/modules/emscripten/system/lib/libcxx/exception.cpp +88 -16
  150. data/modules/emscripten/system/lib/libcxx/future.cpp +6 -0
  151. data/modules/emscripten/system/lib/libcxx/ios.cpp +7 -2
  152. data/modules/emscripten/system/lib/libcxx/iostream.cpp +8 -8
  153. data/modules/emscripten/system/lib/libcxx/locale.cpp +38 -11
  154. data/modules/emscripten/system/lib/libcxx/mutex.cpp +3 -0
  155. data/modules/emscripten/system/lib/libcxx/new.cpp +44 -10
  156. data/modules/emscripten/system/lib/libcxx/optional.cpp +25 -0
  157. data/modules/emscripten/system/lib/libcxx/random.cpp +26 -0
  158. data/modules/emscripten/system/lib/libcxx/readme.txt +1 -1
  159. data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +101 -0
  160. data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +11 -7
  161. data/modules/emscripten/system/lib/libcxx/string.cpp +3 -1
  162. data/modules/emscripten/system/lib/libcxx/strstream.cpp +7 -7
  163. data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +12 -13
  164. data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +33 -36
  165. data/modules/emscripten/system/lib/libcxx/symbols +187 -168
  166. data/modules/emscripten/system/lib/libcxx/system_error.cpp +1 -0
  167. data/modules/emscripten/system/lib/libcxx/thread.cpp +7 -3
  168. data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +9 -6
  169. data/modules/emscripten/system/lib/libcxx/valarray.cpp +2 -0
  170. data/modules/emscripten/third_party/lzma.js/doit.bat +4 -0
  171. data/modules/emscripten/third_party/lzma.js/doit.sh +9 -2
  172. data/modules/emscripten/tools/cache.py +5 -7
  173. data/modules/emscripten/tools/cache.pyc +0 -0
  174. data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +7 -0
  175. data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +9 -1
  176. data/modules/emscripten/tools/eliminator/eliminator-test-output.js +3 -0
  177. data/modules/emscripten/tools/eliminator/eliminator-test.js +9 -1
  178. data/modules/emscripten/tools/file_packager.py +93 -50
  179. data/modules/emscripten/tools/js-optimizer.js +98 -48
  180. data/modules/emscripten/tools/js_optimizer.py +4 -4
  181. data/modules/emscripten/tools/js_optimizer.pyc +0 -0
  182. data/modules/emscripten/tools/jsrun.py +1 -1
  183. data/modules/emscripten/tools/jsrun.pyc +0 -0
  184. data/modules/emscripten/tools/response_file.py +6 -0
  185. data/modules/emscripten/tools/response_file.pyc +0 -0
  186. data/modules/emscripten/tools/settings_template_readonly.py +2 -0
  187. data/modules/emscripten/tools/shared.py +88 -34
  188. data/modules/emscripten/tools/shared.pyc +0 -0
  189. data/modules/emscripten/tools/split.py +21 -13
  190. data/modules/mruby/build_config.rb +7 -1
  191. data/modules/mruby/doc/compile/README.md +5 -9
  192. data/modules/mruby/include/mrbconf.h +5 -2
  193. data/modules/mruby/include/mruby/array.h +1 -0
  194. data/modules/mruby/include/mruby/compile.h +2 -4
  195. data/modules/mruby/include/mruby/dump.h +7 -16
  196. data/modules/mruby/include/mruby/hash.h +1 -1
  197. data/modules/mruby/include/mruby/irep.h +14 -2
  198. data/modules/mruby/include/mruby/khash.h +8 -7
  199. data/modules/mruby/include/mruby/string.h +1 -0
  200. data/modules/mruby/include/mruby/value.h +5 -2
  201. data/modules/mruby/include/mruby.h +12 -13
  202. data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +16 -6
  203. data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +18 -30
  204. data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +21 -0
  205. data/modules/mruby/mrbgems/mruby-math/src/math.c +1 -1
  206. data/modules/mruby/mrbgems/mruby-random/src/random.c +144 -47
  207. data/modules/mruby/mrbgems/mruby-random/test/random.rb +44 -0
  208. data/modules/mruby/mrbgems/mruby-struct/src/struct.c +5 -5
  209. data/modules/mruby/mrblib/numeric.rb +99 -33
  210. data/modules/mruby/src/array.c +11 -4
  211. data/modules/mruby/src/backtrace.c +2 -2
  212. data/modules/mruby/src/class.c +49 -30
  213. data/modules/mruby/src/codegen.c +131 -79
  214. data/modules/mruby/src/debug.c +1 -1
  215. data/modules/mruby/src/dump.c +213 -163
  216. data/modules/mruby/src/error.c +17 -17
  217. data/modules/mruby/src/error.h +1 -1
  218. data/modules/mruby/src/etc.c +10 -0
  219. data/modules/mruby/src/gc.c +35 -17
  220. data/modules/mruby/src/hash.c +5 -5
  221. data/modules/mruby/src/kernel.c +36 -14
  222. data/modules/mruby/src/load.c +238 -296
  223. data/modules/mruby/src/numeric.c +18 -98
  224. data/modules/mruby/src/object.c +3 -5
  225. data/modules/mruby/src/parse.y +63 -56
  226. data/modules/mruby/src/proc.c +8 -5
  227. data/modules/mruby/src/re.h +0 -1
  228. data/modules/mruby/src/state.c +65 -27
  229. data/modules/mruby/src/string.c +3 -31
  230. data/modules/mruby/src/symbol.c +3 -3
  231. data/modules/mruby/src/variable.c +12 -5
  232. data/modules/mruby/src/vm.c +90 -72
  233. data/modules/mruby/tasks/mruby_build.rake +10 -1
  234. data/modules/mruby/tasks/toolchains/gcc.rake +12 -2
  235. data/modules/mruby/tasks/toolchains/{vs2012.rake → visualcpp.rake} +1 -1
  236. data/modules/mruby/test/driver.c +3 -3
  237. data/modules/mruby/test/t/array.rb +5 -5
  238. data/modules/mruby/test/t/class.rb +14 -1
  239. data/modules/mruby/test/t/kernel.rb +4 -0
  240. data/modules/mruby/test/t/module.rb +4 -4
  241. data/modules/mruby/test/t/nameerror.rb +1 -1
  242. data/modules/mruby/tools/mrbc/mrbc.c +23 -17
  243. data/modules/mruby/travis_config.rb +10 -1
  244. metadata +28 -5
  245. data/modules/mruby/tasks/toolchains/vs2010.rake +0 -3
@@ -38,6 +38,7 @@ public:
38
38
  noexcept(is_nothrow_default_constructible<allocator_type>::value);
39
39
  explicit vector(const allocator_type&);
40
40
  explicit vector(size_type n);
41
+ explicit vector(size_type n, const allocator_type&); // C++14
41
42
  vector(size_type n, const value_type& value, const allocator_type& = allocator_type());
42
43
  template <class InputIterator>
43
44
  vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
@@ -161,7 +162,8 @@ public:
161
162
  vector()
162
163
  noexcept(is_nothrow_default_constructible<allocator_type>::value);
163
164
  explicit vector(const allocator_type&);
164
- explicit vector(size_type n, const value_type& value = value_type(), const allocator_type& = allocator_type());
165
+ explicit vector(size_type n, const allocator_type& a = allocator_type()); // C++14
166
+ vector(size_type n, const value_type& value, const allocator_type& = allocator_type());
165
167
  template <class InputIterator>
166
168
  vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
167
169
  vector(const vector& x);
@@ -216,8 +218,10 @@ public:
216
218
  const_reference back() const;
217
219
 
218
220
  void push_back(const value_type& x);
221
+ template <class... Args> void emplace_back(Args&&... args); // C++14
219
222
  void pop_back();
220
223
 
224
+ template <class... Args> iterator emplace(const_iterator position, Args&&... args); // C++14
221
225
  iterator insert(const_iterator position, const value_type& x);
222
226
  iterator insert(const_iterator position, size_type n, const value_type& x);
223
227
  template <class InputIterator>
@@ -272,7 +276,7 @@ void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
272
276
 
273
277
  #include <__undef_min_max>
274
278
 
275
- #ifdef _LIBCPP_DEBUG2
279
+ #ifdef _LIBCPP_DEBUG
276
280
  # include <__debug>
277
281
  #else
278
282
  # define _LIBCPP_ASSERT(x, m) ((void)0)
@@ -319,7 +323,7 @@ __vector_base_common<__b>::__throw_out_of_range() const
319
323
  #pragma warning( push )
320
324
  #pragma warning( disable: 4231 )
321
325
  #endif // _LIBCPP_MSVC
322
- _LIBCPP_EXTERN_TEMPLATE(class __vector_base_common<true>)
326
+ _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_TYPE_VIS __vector_base_common<true>)
323
327
  #ifdef _LIBCPP_MSVC
324
328
  #pragma warning( pop )
325
329
  #endif // _LIBCPP_MSVC
@@ -436,7 +440,7 @@ private:
436
440
  };
437
441
 
438
442
  template <class _Tp, class _Allocator>
439
- _LIBCPP_INLINE_VISIBILITY inline
443
+ inline _LIBCPP_INLINE_VISIBILITY
440
444
  void
441
445
  __vector_base<_Tp, _Allocator>::__destruct_at_end(pointer __new_last) _NOEXCEPT
442
446
  {
@@ -445,7 +449,7 @@ __vector_base<_Tp, _Allocator>::__destruct_at_end(pointer __new_last) _NOEXCEPT
445
449
  }
446
450
 
447
451
  template <class _Tp, class _Allocator>
448
- _LIBCPP_INLINE_VISIBILITY inline
452
+ inline _LIBCPP_INLINE_VISIBILITY
449
453
  __vector_base<_Tp, _Allocator>::__vector_base()
450
454
  _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
451
455
  : __begin_(nullptr),
@@ -455,7 +459,7 @@ __vector_base<_Tp, _Allocator>::__vector_base()
455
459
  }
456
460
 
457
461
  template <class _Tp, class _Allocator>
458
- _LIBCPP_INLINE_VISIBILITY inline
462
+ inline _LIBCPP_INLINE_VISIBILITY
459
463
  __vector_base<_Tp, _Allocator>::__vector_base(const allocator_type& __a)
460
464
  : __begin_(nullptr),
461
465
  __end_(nullptr),
@@ -474,7 +478,7 @@ __vector_base<_Tp, _Allocator>::~__vector_base()
474
478
  }
475
479
 
476
480
  template <class _Tp, class _Allocator = allocator<_Tp> >
477
- class _LIBCPP_TYPE_VIS vector
481
+ class _LIBCPP_TYPE_VIS_ONLY vector
478
482
  : private __vector_base<_Tp, _Allocator>
479
483
  {
480
484
  private:
@@ -514,15 +518,19 @@ public:
514
518
  #endif
515
519
  }
516
520
  explicit vector(size_type __n);
521
+ #if _LIBCPP_STD_VER > 11
522
+ explicit vector(size_type __n, const allocator_type& __a);
523
+ #endif
517
524
  vector(size_type __n, const_reference __x);
518
525
  vector(size_type __n, const_reference __x, const allocator_type& __a);
519
526
  template <class _InputIterator>
520
- vector(_InputIterator __first, _InputIterator __last,
527
+ vector(_InputIterator __first,
521
528
  typename enable_if<__is_input_iterator <_InputIterator>::value &&
522
529
  !__is_forward_iterator<_InputIterator>::value &&
523
530
  is_constructible<
524
531
  value_type,
525
- typename iterator_traits<_InputIterator>::reference>::value>::type* = 0);
532
+ typename iterator_traits<_InputIterator>::reference>::value,
533
+ _InputIterator>::type __last);
526
534
  template <class _InputIterator>
527
535
  vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
528
536
  typename enable_if<__is_input_iterator <_InputIterator>::value &&
@@ -531,11 +539,12 @@ public:
531
539
  value_type,
532
540
  typename iterator_traits<_InputIterator>::reference>::value>::type* = 0);
533
541
  template <class _ForwardIterator>
534
- vector(_ForwardIterator __first, _ForwardIterator __last,
542
+ vector(_ForwardIterator __first,
535
543
  typename enable_if<__is_forward_iterator<_ForwardIterator>::value &&
536
544
  is_constructible<
537
545
  value_type,
538
- typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
546
+ typename iterator_traits<_ForwardIterator>::reference>::value,
547
+ _ForwardIterator>::type __last);
539
548
  template <class _ForwardIterator>
540
549
  vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
541
550
  typename enable_if<__is_forward_iterator<_ForwardIterator>::value &&
@@ -888,7 +897,7 @@ vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
888
897
 
889
898
  // Precondition: __new_size > capacity()
890
899
  template <class _Tp, class _Allocator>
891
- _LIBCPP_INLINE_VISIBILITY inline
900
+ inline _LIBCPP_INLINE_VISIBILITY
892
901
  typename vector<_Tp, _Allocator>::size_type
893
902
  vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
894
903
  {
@@ -926,7 +935,7 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
926
935
  // Postcondition: size() == old size() + __n
927
936
  // Postcondition: [i] == __x for all i in [size() - __n, __n)
928
937
  template <class _Tp, class _Allocator>
929
- _LIBCPP_INLINE_VISIBILITY inline
938
+ inline _LIBCPP_INLINE_VISIBILITY
930
939
  void
931
940
  vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
932
941
  {
@@ -1020,6 +1029,22 @@ vector<_Tp, _Allocator>::vector(size_type __n)
1020
1029
  }
1021
1030
  }
1022
1031
 
1032
+ #if _LIBCPP_STD_VER > 11
1033
+ template <class _Tp, class _Allocator>
1034
+ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
1035
+ : __base(__a)
1036
+ {
1037
+ #if _LIBCPP_DEBUG_LEVEL >= 2
1038
+ __get_db()->__insert_c(this);
1039
+ #endif
1040
+ if (__n > 0)
1041
+ {
1042
+ allocate(__n);
1043
+ __construct_at_end(__n);
1044
+ }
1045
+ }
1046
+ #endif
1047
+
1023
1048
  template <class _Tp, class _Allocator>
1024
1049
  vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x)
1025
1050
  {
@@ -1049,12 +1074,13 @@ vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x, const alloca
1049
1074
 
1050
1075
  template <class _Tp, class _Allocator>
1051
1076
  template <class _InputIterator>
1052
- vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
1077
+ vector<_Tp, _Allocator>::vector(_InputIterator __first,
1053
1078
  typename enable_if<__is_input_iterator <_InputIterator>::value &&
1054
1079
  !__is_forward_iterator<_InputIterator>::value &&
1055
1080
  is_constructible<
1056
1081
  value_type,
1057
- typename iterator_traits<_InputIterator>::reference>::value>::type*)
1082
+ typename iterator_traits<_InputIterator>::reference>::value,
1083
+ _InputIterator>::type __last)
1058
1084
  {
1059
1085
  #if _LIBCPP_DEBUG_LEVEL >= 2
1060
1086
  __get_db()->__insert_c(this);
@@ -1082,11 +1108,12 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, c
1082
1108
 
1083
1109
  template <class _Tp, class _Allocator>
1084
1110
  template <class _ForwardIterator>
1085
- vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last,
1111
+ vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
1086
1112
  typename enable_if<__is_forward_iterator<_ForwardIterator>::value &&
1087
1113
  is_constructible<
1088
1114
  value_type,
1089
- typename iterator_traits<_ForwardIterator>::reference>::value>::type*)
1115
+ typename iterator_traits<_ForwardIterator>::reference>::value,
1116
+ _ForwardIterator>::type __last)
1090
1117
  {
1091
1118
  #if _LIBCPP_DEBUG_LEVEL >= 2
1092
1119
  __get_db()->__insert_c(this);
@@ -1152,7 +1179,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
1152
1179
  #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
1153
1180
 
1154
1181
  template <class _Tp, class _Allocator>
1155
- _LIBCPP_INLINE_VISIBILITY inline
1182
+ inline _LIBCPP_INLINE_VISIBILITY
1156
1183
  vector<_Tp, _Allocator>::vector(vector&& __x)
1157
1184
  _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
1158
1185
  : __base(_VSTD::move(__x.__alloc()))
@@ -1168,7 +1195,7 @@ vector<_Tp, _Allocator>::vector(vector&& __x)
1168
1195
  }
1169
1196
 
1170
1197
  template <class _Tp, class _Allocator>
1171
- _LIBCPP_INLINE_VISIBILITY inline
1198
+ inline _LIBCPP_INLINE_VISIBILITY
1172
1199
  vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a)
1173
1200
  : __base(__a)
1174
1201
  {
@@ -1195,7 +1222,7 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a)
1195
1222
  #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
1196
1223
 
1197
1224
  template <class _Tp, class _Allocator>
1198
- _LIBCPP_INLINE_VISIBILITY inline
1225
+ inline _LIBCPP_INLINE_VISIBILITY
1199
1226
  vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
1200
1227
  {
1201
1228
  #if _LIBCPP_DEBUG_LEVEL >= 2
@@ -1209,7 +1236,7 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
1209
1236
  }
1210
1237
 
1211
1238
  template <class _Tp, class _Allocator>
1212
- _LIBCPP_INLINE_VISIBILITY inline
1239
+ inline _LIBCPP_INLINE_VISIBILITY
1213
1240
  vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
1214
1241
  : __base(__a)
1215
1242
  {
@@ -1226,7 +1253,7 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
1226
1253
  #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
1227
1254
 
1228
1255
  template <class _Tp, class _Allocator>
1229
- _LIBCPP_INLINE_VISIBILITY inline
1256
+ inline _LIBCPP_INLINE_VISIBILITY
1230
1257
  vector<_Tp, _Allocator>&
1231
1258
  vector<_Tp, _Allocator>::operator=(vector&& __x)
1232
1259
  _NOEXCEPT_(
@@ -1270,7 +1297,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
1270
1297
  #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
1271
1298
 
1272
1299
  template <class _Tp, class _Allocator>
1273
- _LIBCPP_INLINE_VISIBILITY inline
1300
+ inline _LIBCPP_INLINE_VISIBILITY
1274
1301
  vector<_Tp, _Allocator>&
1275
1302
  vector<_Tp, _Allocator>::operator=(const vector& __x)
1276
1303
  {
@@ -1359,7 +1386,7 @@ vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
1359
1386
  }
1360
1387
 
1361
1388
  template <class _Tp, class _Allocator>
1362
- _LIBCPP_INLINE_VISIBILITY inline
1389
+ inline _LIBCPP_INLINE_VISIBILITY
1363
1390
  typename vector<_Tp, _Allocator>::iterator
1364
1391
  vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
1365
1392
  {
@@ -1371,7 +1398,7 @@ vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
1371
1398
  }
1372
1399
 
1373
1400
  template <class _Tp, class _Allocator>
1374
- _LIBCPP_INLINE_VISIBILITY inline
1401
+ inline _LIBCPP_INLINE_VISIBILITY
1375
1402
  typename vector<_Tp, _Allocator>::const_iterator
1376
1403
  vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT
1377
1404
  {
@@ -1383,7 +1410,7 @@ vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT
1383
1410
  }
1384
1411
 
1385
1412
  template <class _Tp, class _Allocator>
1386
- _LIBCPP_INLINE_VISIBILITY inline
1413
+ inline _LIBCPP_INLINE_VISIBILITY
1387
1414
  typename vector<_Tp, _Allocator>::iterator
1388
1415
  vector<_Tp, _Allocator>::begin() _NOEXCEPT
1389
1416
  {
@@ -1391,7 +1418,7 @@ vector<_Tp, _Allocator>::begin() _NOEXCEPT
1391
1418
  }
1392
1419
 
1393
1420
  template <class _Tp, class _Allocator>
1394
- _LIBCPP_INLINE_VISIBILITY inline
1421
+ inline _LIBCPP_INLINE_VISIBILITY
1395
1422
  typename vector<_Tp, _Allocator>::const_iterator
1396
1423
  vector<_Tp, _Allocator>::begin() const _NOEXCEPT
1397
1424
  {
@@ -1399,7 +1426,7 @@ vector<_Tp, _Allocator>::begin() const _NOEXCEPT
1399
1426
  }
1400
1427
 
1401
1428
  template <class _Tp, class _Allocator>
1402
- _LIBCPP_INLINE_VISIBILITY inline
1429
+ inline _LIBCPP_INLINE_VISIBILITY
1403
1430
  typename vector<_Tp, _Allocator>::iterator
1404
1431
  vector<_Tp, _Allocator>::end() _NOEXCEPT
1405
1432
  {
@@ -1407,7 +1434,7 @@ vector<_Tp, _Allocator>::end() _NOEXCEPT
1407
1434
  }
1408
1435
 
1409
1436
  template <class _Tp, class _Allocator>
1410
- _LIBCPP_INLINE_VISIBILITY inline
1437
+ inline _LIBCPP_INLINE_VISIBILITY
1411
1438
  typename vector<_Tp, _Allocator>::const_iterator
1412
1439
  vector<_Tp, _Allocator>::end() const _NOEXCEPT
1413
1440
  {
@@ -1415,7 +1442,7 @@ vector<_Tp, _Allocator>::end() const _NOEXCEPT
1415
1442
  }
1416
1443
 
1417
1444
  template <class _Tp, class _Allocator>
1418
- _LIBCPP_INLINE_VISIBILITY inline
1445
+ inline _LIBCPP_INLINE_VISIBILITY
1419
1446
  typename vector<_Tp, _Allocator>::reference
1420
1447
  vector<_Tp, _Allocator>::operator[](size_type __n)
1421
1448
  {
@@ -1424,7 +1451,7 @@ vector<_Tp, _Allocator>::operator[](size_type __n)
1424
1451
  }
1425
1452
 
1426
1453
  template <class _Tp, class _Allocator>
1427
- _LIBCPP_INLINE_VISIBILITY inline
1454
+ inline _LIBCPP_INLINE_VISIBILITY
1428
1455
  typename vector<_Tp, _Allocator>::const_reference
1429
1456
  vector<_Tp, _Allocator>::operator[](size_type __n) const
1430
1457
  {
@@ -1502,7 +1529,7 @@ vector<_Tp, _Allocator>::__push_back_slow_path(_Up& __x)
1502
1529
  }
1503
1530
 
1504
1531
  template <class _Tp, class _Allocator>
1505
- _LIBCPP_INLINE_VISIBILITY inline
1532
+ inline _LIBCPP_INLINE_VISIBILITY
1506
1533
  void
1507
1534
  vector<_Tp, _Allocator>::push_back(const_reference __x)
1508
1535
  {
@@ -1519,7 +1546,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
1519
1546
  #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
1520
1547
 
1521
1548
  template <class _Tp, class _Allocator>
1522
- _LIBCPP_INLINE_VISIBILITY inline
1549
+ inline _LIBCPP_INLINE_VISIBILITY
1523
1550
  void
1524
1551
  vector<_Tp, _Allocator>::push_back(value_type&& __x)
1525
1552
  {
@@ -1551,7 +1578,7 @@ vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args)
1551
1578
 
1552
1579
  template <class _Tp, class _Allocator>
1553
1580
  template <class... _Args>
1554
- _LIBCPP_INLINE_VISIBILITY inline
1581
+ inline _LIBCPP_INLINE_VISIBILITY
1555
1582
  void
1556
1583
  vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
1557
1584
  {
@@ -1570,7 +1597,7 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
1570
1597
  #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
1571
1598
 
1572
1599
  template <class _Tp, class _Allocator>
1573
- _LIBCPP_INLINE_VISIBILITY inline
1600
+ inline _LIBCPP_INLINE_VISIBILITY
1574
1601
  void
1575
1602
  vector<_Tp, _Allocator>::pop_back()
1576
1603
  {
@@ -1579,7 +1606,7 @@ vector<_Tp, _Allocator>::pop_back()
1579
1606
  }
1580
1607
 
1581
1608
  template <class _Tp, class _Allocator>
1582
- _LIBCPP_INLINE_VISIBILITY inline
1609
+ inline _LIBCPP_INLINE_VISIBILITY
1583
1610
  typename vector<_Tp, _Allocator>::iterator
1584
1611
  vector<_Tp, _Allocator>::erase(const_iterator __position)
1585
1612
  {
@@ -1989,7 +2016,7 @@ vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __
1989
2016
  #endif // _LIBCPP_DEBUG_LEVEL >= 2
1990
2017
 
1991
2018
  template <class _Tp, class _Allocator>
1992
- _LIBCPP_INLINE_VISIBILITY inline
2019
+ inline _LIBCPP_INLINE_VISIBILITY
1993
2020
  void
1994
2021
  vector<_Tp, _Allocator>::__invalidate_all_iterators()
1995
2022
  {
@@ -2011,7 +2038,7 @@ struct __has_storage_type<vector<bool, _Allocator> >
2011
2038
  };
2012
2039
 
2013
2040
  template <class _Allocator>
2014
- class _LIBCPP_TYPE_VIS vector<bool, _Allocator>
2041
+ class _LIBCPP_TYPE_VIS_ONLY vector<bool, _Allocator>
2015
2042
  : private __vector_base_common<true>
2016
2043
  {
2017
2044
  public:
@@ -2024,21 +2051,8 @@ public:
2024
2051
  typedef size_type __storage_type;
2025
2052
  typedef __bit_iterator<vector, false> pointer;
2026
2053
  typedef __bit_iterator<vector, true> const_pointer;
2027
- #ifdef _LIBCPP_DEBUG
2028
- typedef __debug_iter<vector, pointer> iterator;
2029
- typedef __debug_iter<vector, const_pointer> const_iterator;
2030
-
2031
- friend class __debug_iter<vector, pointer>;
2032
- friend class __debug_iter<vector, const_pointer>;
2033
-
2034
- pair<iterator*, const_iterator*> __iterator_list_;
2035
-
2036
- _LIBCPP_INLINE_VISIBILITY iterator*& __get_iterator_list(iterator*) {return __iterator_list_.first;}
2037
- _LIBCPP_INLINE_VISIBILITY const_iterator*& __get_iterator_list(const_iterator*) {return __iterator_list_.second;}
2038
- #else // _LIBCPP_DEBUG
2039
2054
  typedef pointer iterator;
2040
2055
  typedef const_pointer const_iterator;
2041
- #endif // _LIBCPP_DEBUG
2042
2056
  typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
2043
2057
  typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
2044
2058
 
@@ -2090,6 +2104,9 @@ public:
2090
2104
  _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a);
2091
2105
  ~vector();
2092
2106
  explicit vector(size_type __n);
2107
+ #if _LIBCPP_STD_VER > 11
2108
+ explicit vector(size_type __n, const allocator_type& __a);
2109
+ #endif
2093
2110
  vector(size_type __n, const value_type& __v);
2094
2111
  vector(size_type __n, const value_type& __v, const allocator_type& __a);
2095
2112
  template <class _InputIterator>
@@ -2221,8 +2238,20 @@ public:
2221
2238
  _LIBCPP_INLINE_VISIBILITY const_reference back() const {return __make_ref(__size_ - 1);}
2222
2239
 
2223
2240
  void push_back(const value_type& __x);
2241
+ #if _LIBCPP_STD_VER > 11
2242
+ template <class... _Args>
2243
+ _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args)
2244
+ { push_back ( value_type ( _VSTD::forward<_Args>(__args)... )); }
2245
+ #endif
2246
+
2224
2247
  _LIBCPP_INLINE_VISIBILITY void pop_back() {--__size_;}
2225
2248
 
2249
+ #if _LIBCPP_STD_VER > 11
2250
+ template <class... _Args>
2251
+ _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator position, _Args&&... __args)
2252
+ { return insert ( position, value_type ( _VSTD::forward<_Args>(__args)... )); }
2253
+ #endif
2254
+
2226
2255
  iterator insert(const_iterator __position, const value_type& __x);
2227
2256
  iterator insert(const_iterator __position, size_type __n, const value_type& __x);
2228
2257
  iterator insert(const_iterator __position, size_type __n, const_reference __x);
@@ -2267,7 +2296,7 @@ private:
2267
2296
  void allocate(size_type __n);
2268
2297
  void deallocate() _NOEXCEPT;
2269
2298
  _LIBCPP_INLINE_VISIBILITY
2270
- static size_type __align(size_type __new_size) _NOEXCEPT
2299
+ static size_type __align_it(size_type __new_size) _NOEXCEPT
2271
2300
  {return __new_size + (__bits_per_word-1) & ~(__bits_per_word-1);};
2272
2301
  _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
2273
2302
  _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
@@ -2285,14 +2314,6 @@ private:
2285
2314
  _LIBCPP_INLINE_VISIBILITY
2286
2315
  const_reference __make_ref(size_type __pos) const _NOEXCEPT
2287
2316
  {return const_reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
2288
- #ifdef _LIBCPP_DEBUG
2289
- _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_type __pos)
2290
- {return iterator(this, pointer(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word)));}
2291
- _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_type __pos) const
2292
- {return const_iterator(this, const_pointer(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word)));}
2293
- _LIBCPP_INLINE_VISIBILITY iterator __const_iterator_cast(const_iterator __p)
2294
- {return iterator(this, pointer(const_cast<__storage_pointer>(__p.base().__seg_), __p.base().__ctz_));}
2295
- #else // _LIBCPP_DEBUG
2296
2317
  _LIBCPP_INLINE_VISIBILITY
2297
2318
  iterator __make_iter(size_type __pos) _NOEXCEPT
2298
2319
  {return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
@@ -2302,7 +2323,6 @@ private:
2302
2323
  _LIBCPP_INLINE_VISIBILITY
2303
2324
  iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT
2304
2325
  {return begin() + (__p - cbegin());}
2305
- #endif // _LIBCPP_DEBUG
2306
2326
 
2307
2327
  _LIBCPP_INLINE_VISIBILITY
2308
2328
  void __copy_assign_alloc(const vector& __v)
@@ -2369,20 +2389,14 @@ private:
2369
2389
  friend class __bit_iterator<vector, false>;
2370
2390
  friend class __bit_iterator<vector, true>;
2371
2391
  friend struct __bit_array<vector>;
2372
- friend struct _LIBCPP_TYPE_VIS hash<vector>;
2392
+ friend struct _LIBCPP_TYPE_VIS_ONLY hash<vector>;
2373
2393
  };
2374
2394
 
2375
2395
  template <class _Allocator>
2376
- #ifndef _LIBCPP_DEBUG
2377
- _LIBCPP_INLINE_VISIBILITY inline
2378
- #endif
2396
+ inline _LIBCPP_INLINE_VISIBILITY
2379
2397
  void
2380
2398
  vector<bool, _Allocator>::__invalidate_all_iterators()
2381
2399
  {
2382
- #ifdef _LIBCPP_DEBUG
2383
- iterator::__remove_all(this);
2384
- const_iterator::__remove_all(this);
2385
- #endif // _LIBCPP_DEBUG
2386
2400
  }
2387
2401
 
2388
2402
  // Allocate space for __n objects
@@ -2430,7 +2444,7 @@ vector<bool, _Allocator>::max_size() const _NOEXCEPT
2430
2444
 
2431
2445
  // Precondition: __new_size > capacity()
2432
2446
  template <class _Allocator>
2433
- _LIBCPP_INLINE_VISIBILITY inline
2447
+ inline _LIBCPP_INLINE_VISIBILITY
2434
2448
  typename vector<bool, _Allocator>::size_type
2435
2449
  vector<bool, _Allocator>::__recommend(size_type __new_size) const
2436
2450
  {
@@ -2440,7 +2454,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
2440
2454
  const size_type __cap = capacity();
2441
2455
  if (__cap >= __ms / 2)
2442
2456
  return __ms;
2443
- return _VSTD::max(2*__cap, __align(__new_size));
2457
+ return _VSTD::max(2*__cap, __align_it(__new_size));
2444
2458
  }
2445
2459
 
2446
2460
  // Default constructs __n objects starting at __end_
@@ -2448,7 +2462,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
2448
2462
  // Precondition: size() + __n <= capacity()
2449
2463
  // Postcondition: size() == size() + __n
2450
2464
  template <class _Allocator>
2451
- _LIBCPP_INLINE_VISIBILITY inline
2465
+ inline _LIBCPP_INLINE_VISIBILITY
2452
2466
  void
2453
2467
  vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
2454
2468
  {
@@ -2472,7 +2486,7 @@ vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardI
2472
2486
  }
2473
2487
 
2474
2488
  template <class _Allocator>
2475
- _LIBCPP_INLINE_VISIBILITY inline
2489
+ inline _LIBCPP_INLINE_VISIBILITY
2476
2490
  vector<bool, _Allocator>::vector()
2477
2491
  _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
2478
2492
  : __begin_(nullptr),
@@ -2482,7 +2496,7 @@ vector<bool, _Allocator>::vector()
2482
2496
  }
2483
2497
 
2484
2498
  template <class _Allocator>
2485
- _LIBCPP_INLINE_VISIBILITY inline
2499
+ inline _LIBCPP_INLINE_VISIBILITY
2486
2500
  vector<bool, _Allocator>::vector(const allocator_type& __a)
2487
2501
  : __begin_(nullptr),
2488
2502
  __size_(0),
@@ -2503,6 +2517,21 @@ vector<bool, _Allocator>::vector(size_type __n)
2503
2517
  }
2504
2518
  }
2505
2519
 
2520
+ #if _LIBCPP_STD_VER > 11
2521
+ template <class _Allocator>
2522
+ vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
2523
+ : __begin_(nullptr),
2524
+ __size_(0),
2525
+ __cap_alloc_(0, static_cast<__storage_allocator>(__a))
2526
+ {
2527
+ if (__n > 0)
2528
+ {
2529
+ allocate(__n);
2530
+ __construct_at_end(__n, false);
2531
+ }
2532
+ }
2533
+ #endif
2534
+
2506
2535
  template <class _Allocator>
2507
2536
  vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
2508
2537
  : __begin_(nullptr),
@@ -2652,9 +2681,7 @@ vector<bool, _Allocator>::~vector()
2652
2681
  {
2653
2682
  if (__begin_ != nullptr)
2654
2683
  __storage_traits::deallocate(__alloc(), __begin_, __cap());
2655
- #ifdef _LIBCPP_DEBUG
2656
2684
  __invalidate_all_iterators();
2657
- #endif
2658
2685
  }
2659
2686
 
2660
2687
  template <class _Allocator>
@@ -2707,7 +2734,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
2707
2734
  #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
2708
2735
 
2709
2736
  template <class _Allocator>
2710
- _LIBCPP_INLINE_VISIBILITY inline
2737
+ inline _LIBCPP_INLINE_VISIBILITY
2711
2738
  vector<bool, _Allocator>::vector(vector&& __v)
2712
2739
  _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
2713
2740
  : __begin_(__v.__begin_),
@@ -2741,7 +2768,7 @@ vector<bool, _Allocator>::vector(vector&& __v, const allocator_type& __a)
2741
2768
  }
2742
2769
 
2743
2770
  template <class _Allocator>
2744
- _LIBCPP_INLINE_VISIBILITY inline
2771
+ inline _LIBCPP_INLINE_VISIBILITY
2745
2772
  vector<bool, _Allocator>&
2746
2773
  vector<bool, _Allocator>::operator=(vector&& __v)
2747
2774
  _NOEXCEPT_(
@@ -3028,7 +3055,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
3028
3055
  }
3029
3056
 
3030
3057
  template <class _Allocator>
3031
- _LIBCPP_INLINE_VISIBILITY inline
3058
+ inline _LIBCPP_INLINE_VISIBILITY
3032
3059
  typename vector<bool, _Allocator>::iterator
3033
3060
  vector<bool, _Allocator>::erase(const_iterator __position)
3034
3061
  {
@@ -3059,10 +3086,6 @@ vector<bool, _Allocator>::swap(vector& __x)
3059
3086
  _VSTD::swap(this->__size_, __x.__size_);
3060
3087
  _VSTD::swap(this->__cap(), __x.__cap());
3061
3088
  __swap_alloc(this->__alloc(), __x.__alloc());
3062
- #ifdef _LIBCPP_DEBUG
3063
- iterator::swap(this, &__x);
3064
- const_iterator::swap(this, &__x);
3065
- #endif // _LIBCPP_DEBUG
3066
3089
  }
3067
3090
 
3068
3091
  template <class _Allocator>
@@ -3152,7 +3175,7 @@ vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
3152
3175
  }
3153
3176
 
3154
3177
  template <class _Allocator>
3155
- struct _LIBCPP_TYPE_VIS hash<vector<bool, _Allocator> >
3178
+ struct _LIBCPP_TYPE_VIS_ONLY hash<vector<bool, _Allocator> >
3156
3179
  : public unary_function<vector<bool, _Allocator>, size_t>
3157
3180
  {
3158
3181
  _LIBCPP_INLINE_VISIBILITY
@@ -3161,7 +3184,7 @@ struct _LIBCPP_TYPE_VIS hash<vector<bool, _Allocator> >
3161
3184
  };
3162
3185
 
3163
3186
  template <class _Tp, class _Allocator>
3164
- _LIBCPP_INLINE_VISIBILITY inline
3187
+ inline _LIBCPP_INLINE_VISIBILITY
3165
3188
  bool
3166
3189
  operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3167
3190
  {
@@ -3170,7 +3193,7 @@ operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3170
3193
  }
3171
3194
 
3172
3195
  template <class _Tp, class _Allocator>
3173
- _LIBCPP_INLINE_VISIBILITY inline
3196
+ inline _LIBCPP_INLINE_VISIBILITY
3174
3197
  bool
3175
3198
  operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3176
3199
  {
@@ -3178,7 +3201,7 @@ operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3178
3201
  }
3179
3202
 
3180
3203
  template <class _Tp, class _Allocator>
3181
- _LIBCPP_INLINE_VISIBILITY inline
3204
+ inline _LIBCPP_INLINE_VISIBILITY
3182
3205
  bool
3183
3206
  operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3184
3207
  {
@@ -3186,7 +3209,7 @@ operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3186
3209
  }
3187
3210
 
3188
3211
  template <class _Tp, class _Allocator>
3189
- _LIBCPP_INLINE_VISIBILITY inline
3212
+ inline _LIBCPP_INLINE_VISIBILITY
3190
3213
  bool
3191
3214
  operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3192
3215
  {
@@ -3194,7 +3217,7 @@ operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3194
3217
  }
3195
3218
 
3196
3219
  template <class _Tp, class _Allocator>
3197
- _LIBCPP_INLINE_VISIBILITY inline
3220
+ inline _LIBCPP_INLINE_VISIBILITY
3198
3221
  bool
3199
3222
  operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3200
3223
  {
@@ -3202,7 +3225,7 @@ operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3202
3225
  }
3203
3226
 
3204
3227
  template <class _Tp, class _Allocator>
3205
- _LIBCPP_INLINE_VISIBILITY inline
3228
+ inline _LIBCPP_INLINE_VISIBILITY
3206
3229
  bool
3207
3230
  operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
3208
3231
  {
@@ -3210,7 +3233,7 @@ operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
3210
3233
  }
3211
3234
 
3212
3235
  template <class _Tp, class _Allocator>
3213
- _LIBCPP_INLINE_VISIBILITY inline
3236
+ inline _LIBCPP_INLINE_VISIBILITY
3214
3237
  void
3215
3238
  swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
3216
3239
  _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))