webruby 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webruby/config.rb +4 -9
- data/lib/webruby/rake/files.rake +2 -2
- data/modules/emscripten/AUTHORS +9 -1
- data/modules/emscripten/CONTRIBUTING.markdown +5 -0
- data/modules/emscripten/ChangeLog +435 -0
- data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +26 -0
- data/modules/emscripten/cmake/Platform/Emscripten.cmake +9 -2
- data/modules/emscripten/em++ +0 -2
- data/modules/emscripten/emcc +92 -32
- data/modules/emscripten/emlink.py +16 -13
- data/modules/emscripten/emmake +1 -1
- data/modules/emscripten/emrun +918 -0
- data/modules/emscripten/emrun.bat +2 -0
- data/modules/emscripten/emscripten.py +545 -20
- data/modules/emscripten/src/analyzer.js +6 -1
- data/modules/emscripten/src/compiler.js +25 -16
- data/modules/emscripten/src/emrun_postjs.js +20 -0
- data/modules/emscripten/{tests → src}/hello_world.js +0 -0
- data/modules/emscripten/src/intertyper.js +45 -16
- data/modules/emscripten/src/jsifier.js +78 -48
- data/modules/emscripten/src/library.js +381 -96
- data/modules/emscripten/src/library_browser.js +50 -53
- data/modules/emscripten/src/library_egl.js +66 -24
- data/modules/emscripten/src/library_fs.js +122 -90
- data/modules/emscripten/src/library_gl.js +739 -353
- data/modules/emscripten/src/library_glfw.js +9 -3
- data/modules/emscripten/src/library_glut.js +10 -5
- data/modules/emscripten/src/library_idbfs.js +14 -14
- data/modules/emscripten/src/library_memfs.js +65 -41
- data/modules/emscripten/src/library_nodefs.js +61 -9
- data/modules/emscripten/src/library_openal.js +4 -4
- data/modules/emscripten/src/library_path.js +9 -13
- data/modules/emscripten/src/library_sdl.js +301 -64
- data/modules/emscripten/src/library_sockfs.js +7 -5
- data/modules/emscripten/src/modules.js +62 -22
- data/modules/emscripten/src/parseTools.js +135 -102
- data/modules/emscripten/src/postamble.js +3 -4
- data/modules/emscripten/src/preamble.js +49 -29
- data/modules/emscripten/src/proxyClient.js +1 -1
- data/modules/emscripten/src/proxyWorker.js +10 -10
- data/modules/emscripten/src/relooper/Relooper.cpp +15 -4
- data/modules/emscripten/src/runtime.js +32 -8
- data/modules/emscripten/src/settings.js +25 -8
- data/modules/emscripten/src/shell.html +6 -3
- data/modules/emscripten/src/shell.js +13 -11
- data/modules/emscripten/src/simd.js +602 -432
- data/modules/emscripten/src/struct_info.json +22 -2
- data/modules/emscripten/src/utility.js +32 -17
- data/modules/emscripten/system/include/SDL/SDL_events.h +1 -0
- data/modules/emscripten/system/include/compat/ctype.h +17 -0
- data/modules/emscripten/system/include/compat/wchar.h +23 -0
- data/modules/emscripten/system/include/compat/wctype.h +23 -0
- data/modules/emscripten/system/include/emscripten/emmintrin.h +87 -0
- data/modules/emscripten/system/include/emscripten/emscripten.h +30 -4
- data/modules/emscripten/system/include/emscripten/vector.h +29 -1
- data/modules/emscripten/system/include/emscripten/xmmintrin.h +131 -0
- data/modules/emscripten/system/include/libcxx/CREDITS.TXT +9 -1
- data/modules/emscripten/system/include/libcxx/__bit_reference +8 -8
- data/modules/emscripten/system/include/libcxx/__config +95 -17
- data/modules/emscripten/system/include/libcxx/__debug +25 -4
- data/modules/emscripten/system/include/libcxx/__functional_03 +7 -7
- data/modules/emscripten/system/include/libcxx/__functional_base +169 -9
- data/modules/emscripten/system/include/libcxx/__functional_base_03 +1 -1
- data/modules/emscripten/system/include/libcxx/__hash_table +25 -25
- data/modules/emscripten/system/include/libcxx/__locale +21 -19
- data/modules/emscripten/system/include/libcxx/__mutex_base +2 -33
- data/modules/emscripten/system/include/libcxx/__split_buffer +9 -9
- data/modules/emscripten/system/include/libcxx/__std_stream +14 -0
- data/modules/emscripten/system/include/libcxx/__tree +35 -26
- data/modules/emscripten/system/include/libcxx/__tuple +15 -15
- data/modules/emscripten/system/include/libcxx/__tuple_03 +2 -2
- data/modules/emscripten/system/include/libcxx/__undef_min_max +8 -0
- data/modules/emscripten/system/include/libcxx/algorithm +121 -110
- data/modules/emscripten/system/include/libcxx/array +15 -15
- data/modules/emscripten/system/include/libcxx/bitset +4 -4
- data/modules/emscripten/system/include/libcxx/chrono +51 -17
- data/modules/emscripten/system/include/libcxx/cmath +25 -23
- data/modules/emscripten/system/include/libcxx/codecvt +21 -18
- data/modules/emscripten/system/include/libcxx/complex +48 -7
- data/modules/emscripten/system/include/libcxx/cstddef +1 -1
- data/modules/emscripten/system/include/libcxx/cstdio +8 -1
- data/modules/emscripten/system/include/libcxx/cstdlib +1 -1
- data/modules/emscripten/system/include/libcxx/cwchar +1 -1
- data/modules/emscripten/system/include/libcxx/deque +26 -12
- data/modules/emscripten/system/include/libcxx/dynarray +311 -0
- data/modules/emscripten/system/include/libcxx/exception +4 -4
- data/modules/emscripten/system/include/libcxx/ext/__hash +3 -3
- data/modules/emscripten/system/include/libcxx/ext/hash_map +19 -15
- data/modules/emscripten/system/include/libcxx/ext/hash_set +7 -3
- data/modules/emscripten/system/include/libcxx/forward_list +33 -7
- data/modules/emscripten/system/include/libcxx/fstream +4 -4
- data/modules/emscripten/system/include/libcxx/functional +200 -170
- data/modules/emscripten/system/include/libcxx/future +83 -39
- data/modules/emscripten/system/include/libcxx/initializer_list +24 -11
- data/modules/emscripten/system/include/libcxx/iomanip +147 -0
- data/modules/emscripten/system/include/libcxx/ios +24 -16
- data/modules/emscripten/system/include/libcxx/iosfwd +19 -19
- data/modules/emscripten/system/include/libcxx/istream +13 -8
- data/modules/emscripten/system/include/libcxx/iterator +108 -417
- data/modules/emscripten/system/include/libcxx/limits +8 -4
- data/modules/emscripten/system/include/libcxx/list +28 -8
- data/modules/emscripten/system/include/libcxx/locale +153 -390
- data/modules/emscripten/system/include/libcxx/map +280 -100
- data/modules/emscripten/system/include/libcxx/memory +49 -97
- data/modules/emscripten/system/include/libcxx/mutex +2 -2
- data/modules/emscripten/system/include/libcxx/new +43 -14
- data/modules/emscripten/system/include/libcxx/numeric +2 -2
- data/modules/emscripten/system/include/libcxx/optional +697 -0
- data/modules/emscripten/system/include/libcxx/ostream +17 -8
- data/modules/emscripten/system/include/libcxx/queue +5 -5
- data/modules/emscripten/system/include/libcxx/random +53 -51
- data/modules/emscripten/system/include/libcxx/ratio +11 -11
- data/modules/emscripten/system/include/libcxx/readme.txt +1 -1
- data/modules/emscripten/system/include/libcxx/regex +23 -20
- data/modules/emscripten/system/include/libcxx/scoped_allocator +1 -1
- data/modules/emscripten/system/include/libcxx/set +166 -2
- data/modules/emscripten/system/include/libcxx/shared_mutex +419 -0
- data/modules/emscripten/system/include/libcxx/sstream +4 -4
- data/modules/emscripten/system/include/libcxx/stack +3 -3
- data/modules/emscripten/system/include/libcxx/streambuf +5 -5
- data/modules/emscripten/system/include/libcxx/string +372 -324
- data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +99 -0
- data/modules/emscripten/system/include/libcxx/support/ibm/support.h +54 -0
- data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +326 -0
- data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +6 -6
- data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +15 -15
- data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +2 -0
- data/modules/emscripten/system/include/libcxx/support/win32/support.h +6 -1
- data/modules/emscripten/system/include/libcxx/system_error +14 -8
- data/modules/emscripten/system/include/libcxx/thread +7 -8
- data/modules/emscripten/system/include/libcxx/tuple +29 -88
- data/modules/emscripten/system/include/libcxx/type_traits +253 -209
- data/modules/emscripten/system/include/libcxx/typeindex +3 -3
- data/modules/emscripten/system/include/libcxx/unordered_map +162 -101
- data/modules/emscripten/system/include/libcxx/unordered_set +79 -2
- data/modules/emscripten/system/include/libcxx/utility +20 -20
- data/modules/emscripten/system/include/libcxx/valarray +23 -23
- data/modules/emscripten/system/include/libcxx/vector +114 -91
- data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +3352 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +35 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +1011 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +158 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +231 -0
- data/modules/emscripten/system/lib/libcextra.symbols +7 -0
- data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +9 -1
- data/modules/emscripten/system/lib/libcxx/algorithm.cpp +1 -0
- data/modules/emscripten/system/lib/libcxx/debug.cpp +66 -42
- data/modules/emscripten/system/lib/libcxx/exception.cpp +88 -16
- data/modules/emscripten/system/lib/libcxx/future.cpp +6 -0
- data/modules/emscripten/system/lib/libcxx/ios.cpp +7 -2
- data/modules/emscripten/system/lib/libcxx/iostream.cpp +8 -8
- data/modules/emscripten/system/lib/libcxx/locale.cpp +38 -11
- data/modules/emscripten/system/lib/libcxx/mutex.cpp +3 -0
- data/modules/emscripten/system/lib/libcxx/new.cpp +44 -10
- data/modules/emscripten/system/lib/libcxx/optional.cpp +25 -0
- data/modules/emscripten/system/lib/libcxx/random.cpp +26 -0
- data/modules/emscripten/system/lib/libcxx/readme.txt +1 -1
- data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +101 -0
- data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +11 -7
- data/modules/emscripten/system/lib/libcxx/string.cpp +3 -1
- data/modules/emscripten/system/lib/libcxx/strstream.cpp +7 -7
- data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +12 -13
- data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +33 -36
- data/modules/emscripten/system/lib/libcxx/symbols +187 -168
- data/modules/emscripten/system/lib/libcxx/system_error.cpp +1 -0
- data/modules/emscripten/system/lib/libcxx/thread.cpp +7 -3
- data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +9 -6
- data/modules/emscripten/system/lib/libcxx/valarray.cpp +2 -0
- data/modules/emscripten/third_party/lzma.js/doit.bat +4 -0
- data/modules/emscripten/third_party/lzma.js/doit.sh +9 -2
- data/modules/emscripten/tools/cache.py +5 -7
- data/modules/emscripten/tools/cache.pyc +0 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +7 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +9 -1
- data/modules/emscripten/tools/eliminator/eliminator-test-output.js +3 -0
- data/modules/emscripten/tools/eliminator/eliminator-test.js +9 -1
- data/modules/emscripten/tools/file_packager.py +93 -50
- data/modules/emscripten/tools/js-optimizer.js +98 -48
- data/modules/emscripten/tools/js_optimizer.py +4 -4
- data/modules/emscripten/tools/js_optimizer.pyc +0 -0
- data/modules/emscripten/tools/jsrun.py +1 -1
- data/modules/emscripten/tools/jsrun.pyc +0 -0
- data/modules/emscripten/tools/response_file.py +6 -0
- data/modules/emscripten/tools/response_file.pyc +0 -0
- data/modules/emscripten/tools/settings_template_readonly.py +2 -0
- data/modules/emscripten/tools/shared.py +88 -34
- data/modules/emscripten/tools/shared.pyc +0 -0
- data/modules/emscripten/tools/split.py +21 -13
- data/modules/mruby/build_config.rb +7 -1
- data/modules/mruby/doc/compile/README.md +5 -9
- data/modules/mruby/include/mrbconf.h +5 -2
- data/modules/mruby/include/mruby/array.h +1 -0
- data/modules/mruby/include/mruby/compile.h +2 -4
- data/modules/mruby/include/mruby/dump.h +7 -16
- data/modules/mruby/include/mruby/hash.h +1 -1
- data/modules/mruby/include/mruby/irep.h +14 -2
- data/modules/mruby/include/mruby/khash.h +8 -7
- data/modules/mruby/include/mruby/string.h +1 -0
- data/modules/mruby/include/mruby/value.h +5 -2
- data/modules/mruby/include/mruby.h +12 -13
- data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +16 -6
- data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +18 -30
- data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +21 -0
- data/modules/mruby/mrbgems/mruby-math/src/math.c +1 -1
- data/modules/mruby/mrbgems/mruby-random/src/random.c +144 -47
- data/modules/mruby/mrbgems/mruby-random/test/random.rb +44 -0
- data/modules/mruby/mrbgems/mruby-struct/src/struct.c +5 -5
- data/modules/mruby/mrblib/numeric.rb +99 -33
- data/modules/mruby/src/array.c +11 -4
- data/modules/mruby/src/backtrace.c +2 -2
- data/modules/mruby/src/class.c +49 -30
- data/modules/mruby/src/codegen.c +131 -79
- data/modules/mruby/src/debug.c +1 -1
- data/modules/mruby/src/dump.c +213 -163
- data/modules/mruby/src/error.c +17 -17
- data/modules/mruby/src/error.h +1 -1
- data/modules/mruby/src/etc.c +10 -0
- data/modules/mruby/src/gc.c +35 -17
- data/modules/mruby/src/hash.c +5 -5
- data/modules/mruby/src/kernel.c +36 -14
- data/modules/mruby/src/load.c +238 -296
- data/modules/mruby/src/numeric.c +18 -98
- data/modules/mruby/src/object.c +3 -5
- data/modules/mruby/src/parse.y +63 -56
- data/modules/mruby/src/proc.c +8 -5
- data/modules/mruby/src/re.h +0 -1
- data/modules/mruby/src/state.c +65 -27
- data/modules/mruby/src/string.c +3 -31
- data/modules/mruby/src/symbol.c +3 -3
- data/modules/mruby/src/variable.c +12 -5
- data/modules/mruby/src/vm.c +90 -72
- data/modules/mruby/tasks/mruby_build.rake +10 -1
- data/modules/mruby/tasks/toolchains/gcc.rake +12 -2
- data/modules/mruby/tasks/toolchains/{vs2012.rake → visualcpp.rake} +1 -1
- data/modules/mruby/test/driver.c +3 -3
- data/modules/mruby/test/t/array.rb +5 -5
- data/modules/mruby/test/t/class.rb +14 -1
- data/modules/mruby/test/t/kernel.rb +4 -0
- data/modules/mruby/test/t/module.rb +4 -4
- data/modules/mruby/test/t/nameerror.rb +1 -1
- data/modules/mruby/tools/mrbc/mrbc.c +23 -17
- data/modules/mruby/travis_config.rb +10 -1
- metadata +28 -5
- data/modules/mruby/tasks/toolchains/vs2010.rake +0 -3
@@ -55,7 +55,7 @@ struct hash<type_index>
|
|
55
55
|
|
56
56
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
57
57
|
|
58
|
-
class
|
58
|
+
class _LIBCPP_TYPE_VIS_ONLY type_index
|
59
59
|
{
|
60
60
|
const type_info* __t_;
|
61
61
|
public:
|
@@ -87,10 +87,10 @@ public:
|
|
87
87
|
const char* name() const _NOEXCEPT {return __t_->name();}
|
88
88
|
};
|
89
89
|
|
90
|
-
template <class _Tp> struct
|
90
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash;
|
91
91
|
|
92
92
|
template <>
|
93
|
-
struct
|
93
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<type_index>
|
94
94
|
: public unary_function<type_index, size_t>
|
95
95
|
{
|
96
96
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -69,6 +69,22 @@ public:
|
|
69
69
|
unordered_map(initializer_list<value_type>, size_type n = 0,
|
70
70
|
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
|
71
71
|
const allocator_type& a = allocator_type());
|
72
|
+
unordered_map(size_type n, const allocator_type& a)
|
73
|
+
: unordered_map(n, hasher(), key_equal(), a) {} // C++14
|
74
|
+
unordered_map(size_type n, const hasher& hf, const allocator_type& a)
|
75
|
+
: unordered_map(n, hf, key_equal(), a) {} // C++14
|
76
|
+
template <class InputIterator>
|
77
|
+
unordered_map(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
|
78
|
+
: unordered_map(f, l, n, hasher(), key_equal(), a) {} // C++14
|
79
|
+
template <class InputIterator>
|
80
|
+
unordered_map(InputIterator f, InputIterator l, size_type n, const hasher& hf,
|
81
|
+
const allocator_type& a)
|
82
|
+
: unordered_map(f, l, n, hf, key_equal(), a) {} // C++14
|
83
|
+
unordered_map(initializer_list<value_type> il, size_type n, const allocator_type& a)
|
84
|
+
: unordered_map(il, n, hasher(), key_equal(), a) {} // C++14
|
85
|
+
unordered_map(initializer_list<value_type> il, size_type n, const hasher& hf,
|
86
|
+
const allocator_type& a)
|
87
|
+
: unordered_map(il, n, hf, key_equal(), a) {} // C++14
|
72
88
|
~unordered_map();
|
73
89
|
unordered_map& operator=(const unordered_map&);
|
74
90
|
unordered_map& operator=(unordered_map&&)
|
@@ -217,6 +233,22 @@ public:
|
|
217
233
|
unordered_multimap(initializer_list<value_type>, size_type n = 0,
|
218
234
|
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
|
219
235
|
const allocator_type& a = allocator_type());
|
236
|
+
unordered_multimap(size_type n, const allocator_type& a)
|
237
|
+
: unordered_multimap(n, hasher(), key_equal(), a) {} // C++14
|
238
|
+
unordered_multimap(size_type n, const hasher& hf, const allocator_type& a)
|
239
|
+
: unordered_multimap(n, hf, key_equal(), a) {} // C++14
|
240
|
+
template <class InputIterator>
|
241
|
+
unordered_multimap(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
|
242
|
+
: unordered_multimap(f, l, n, hasher(), key_equal(), a) {} // C++14
|
243
|
+
template <class InputIterator>
|
244
|
+
unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf,
|
245
|
+
const allocator_type& a)
|
246
|
+
: unordered_multimap(f, l, n, hf, key_equal(), a) {} // C++14
|
247
|
+
unordered_multimap(initializer_list<value_type> il, size_type n, const allocator_type& a)
|
248
|
+
: unordered_multimap(il, n, hasher(), key_equal(), a) {} // C++14
|
249
|
+
unordered_multimap(initializer_list<value_type> il, size_type n, const hasher& hf,
|
250
|
+
const allocator_type& a)
|
251
|
+
: unordered_multimap(il, n, hf, key_equal(), a) {} // C++14
|
220
252
|
~unordered_multimap();
|
221
253
|
unordered_multimap& operator=(const unordered_multimap&);
|
222
254
|
unordered_multimap& operator=(unordered_multimap&&)
|
@@ -493,8 +525,73 @@ public:
|
|
493
525
|
}
|
494
526
|
};
|
495
527
|
|
528
|
+
#if __cplusplus >= 201103L
|
529
|
+
|
530
|
+
template <class _Key, class _Tp>
|
531
|
+
union __hash_value_type
|
532
|
+
{
|
533
|
+
typedef _Key key_type;
|
534
|
+
typedef _Tp mapped_type;
|
535
|
+
typedef pair<const key_type, mapped_type> value_type;
|
536
|
+
typedef pair<key_type, mapped_type> __nc_value_type;
|
537
|
+
|
538
|
+
value_type __cc;
|
539
|
+
__nc_value_type __nc;
|
540
|
+
|
541
|
+
template <class ..._Args>
|
542
|
+
_LIBCPP_INLINE_VISIBILITY
|
543
|
+
__hash_value_type(_Args&& ...__args)
|
544
|
+
: __cc(std::forward<_Args>(__args)...) {}
|
545
|
+
|
546
|
+
_LIBCPP_INLINE_VISIBILITY
|
547
|
+
__hash_value_type(const __hash_value_type& __v)
|
548
|
+
: __cc(__v.__cc) {}
|
549
|
+
|
550
|
+
_LIBCPP_INLINE_VISIBILITY
|
551
|
+
__hash_value_type(__hash_value_type&& __v)
|
552
|
+
: __nc(std::move(__v.__nc)) {}
|
553
|
+
|
554
|
+
_LIBCPP_INLINE_VISIBILITY
|
555
|
+
__hash_value_type& operator=(const __hash_value_type& __v)
|
556
|
+
{__nc = __v.__cc; return *this;}
|
557
|
+
|
558
|
+
_LIBCPP_INLINE_VISIBILITY
|
559
|
+
__hash_value_type& operator=(__hash_value_type&& __v)
|
560
|
+
{__nc = std::move(__v.__nc); return *this;}
|
561
|
+
|
562
|
+
_LIBCPP_INLINE_VISIBILITY
|
563
|
+
~__hash_value_type() {__cc.~value_type();}
|
564
|
+
};
|
565
|
+
|
566
|
+
#else
|
567
|
+
|
568
|
+
template <class _Key, class _Tp>
|
569
|
+
struct __hash_value_type
|
570
|
+
{
|
571
|
+
typedef _Key key_type;
|
572
|
+
typedef _Tp mapped_type;
|
573
|
+
typedef pair<const key_type, mapped_type> value_type;
|
574
|
+
|
575
|
+
value_type __cc;
|
576
|
+
|
577
|
+
_LIBCPP_INLINE_VISIBILITY
|
578
|
+
__hash_value_type() {}
|
579
|
+
|
580
|
+
template <class _A0>
|
581
|
+
_LIBCPP_INLINE_VISIBILITY
|
582
|
+
__hash_value_type(const _A0& __a0)
|
583
|
+
: __cc(__a0) {}
|
584
|
+
|
585
|
+
template <class _A0, class _A1>
|
586
|
+
_LIBCPP_INLINE_VISIBILITY
|
587
|
+
__hash_value_type(const _A0& __a0, const _A1& __a1)
|
588
|
+
: __cc(__a0, __a1) {}
|
589
|
+
};
|
590
|
+
|
591
|
+
#endif
|
592
|
+
|
496
593
|
template <class _HashIterator>
|
497
|
-
class
|
594
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator
|
498
595
|
{
|
499
596
|
_HashIterator __i_;
|
500
597
|
|
@@ -542,15 +639,15 @@ public:
|
|
542
639
|
bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
|
543
640
|
{return __x.__i_ != __y.__i_;}
|
544
641
|
|
545
|
-
template <class, class, class, class, class> friend class
|
546
|
-
template <class, class, class, class, class> friend class
|
547
|
-
template <class> friend class
|
548
|
-
template <class> friend class
|
549
|
-
template <class> friend class
|
642
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
643
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
|
644
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
|
645
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
|
646
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
|
550
647
|
};
|
551
648
|
|
552
649
|
template <class _HashIterator>
|
553
|
-
class
|
650
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator
|
554
651
|
{
|
555
652
|
_HashIterator __i_;
|
556
653
|
|
@@ -603,15 +700,15 @@ public:
|
|
603
700
|
bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
|
604
701
|
{return __x.__i_ != __y.__i_;}
|
605
702
|
|
606
|
-
template <class, class, class, class, class> friend class
|
607
|
-
template <class, class, class, class, class> friend class
|
608
|
-
template <class> friend class
|
609
|
-
template <class> friend class
|
703
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
704
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
|
705
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
|
706
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
|
610
707
|
};
|
611
708
|
|
612
709
|
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
613
710
|
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
614
|
-
class
|
711
|
+
class _LIBCPP_TYPE_VIS_ONLY unordered_map
|
615
712
|
{
|
616
713
|
public:
|
617
714
|
// types
|
@@ -628,49 +725,7 @@ public:
|
|
628
725
|
"Invalid allocator::value_type");
|
629
726
|
|
630
727
|
private:
|
631
|
-
|
632
|
-
union __value_type
|
633
|
-
{
|
634
|
-
typedef typename unordered_map::value_type value_type;
|
635
|
-
typedef typename unordered_map::__nc_value_type __nc_value_type;
|
636
|
-
value_type __cc;
|
637
|
-
__nc_value_type __nc;
|
638
|
-
|
639
|
-
template <class ..._Args>
|
640
|
-
__value_type(_Args&& ...__args)
|
641
|
-
: __cc(std::forward<_Args>(__args)...) {}
|
642
|
-
|
643
|
-
__value_type(const __value_type& __v)
|
644
|
-
: __cc(std::move(__v.__cc)) {}
|
645
|
-
|
646
|
-
__value_type(__value_type&& __v)
|
647
|
-
: __nc(std::move(__v.__nc)) {}
|
648
|
-
|
649
|
-
__value_type& operator=(const __value_type& __v)
|
650
|
-
{__nc = __v.__cc; return *this;}
|
651
|
-
|
652
|
-
__value_type& operator=(__value_type&& __v)
|
653
|
-
{__nc = std::move(__v.__nc); return *this;}
|
654
|
-
|
655
|
-
~__value_type() {__cc.~value_type();}
|
656
|
-
};
|
657
|
-
#else
|
658
|
-
struct __value_type
|
659
|
-
{
|
660
|
-
typedef typename unordered_map::value_type value_type;
|
661
|
-
value_type __cc;
|
662
|
-
|
663
|
-
__value_type() {}
|
664
|
-
|
665
|
-
template <class _A0>
|
666
|
-
__value_type(const _A0& __a0)
|
667
|
-
: __cc(__a0) {}
|
668
|
-
|
669
|
-
template <class _A0, class _A1>
|
670
|
-
__value_type(const _A0& __a0, const _A1& __a1)
|
671
|
-
: __cc(__a0, __a1) {}
|
672
|
-
};
|
673
|
-
#endif
|
728
|
+
typedef __hash_value_type<key_type, mapped_type> __value_type;
|
674
729
|
typedef __unordered_map_hasher<key_type, __value_type, hasher> __hasher;
|
675
730
|
typedef __unordered_map_equal<key_type, __value_type, key_equal> __key_equal;
|
676
731
|
typedef typename allocator_traits<allocator_type>::template
|
@@ -745,6 +800,30 @@ public:
|
|
745
800
|
const hasher& __hf, const key_equal& __eql,
|
746
801
|
const allocator_type& __a);
|
747
802
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
803
|
+
#if _LIBCPP_STD_VER > 11
|
804
|
+
_LIBCPP_INLINE_VISIBILITY
|
805
|
+
unordered_map(size_type __n, const allocator_type& __a)
|
806
|
+
: unordered_map(__n, hasher(), key_equal(), __a) {}
|
807
|
+
_LIBCPP_INLINE_VISIBILITY
|
808
|
+
unordered_map(size_type __n, const hasher& __hf, const allocator_type& __a)
|
809
|
+
: unordered_map(__n, __hf, key_equal(), __a) {}
|
810
|
+
template <class _InputIterator>
|
811
|
+
_LIBCPP_INLINE_VISIBILITY
|
812
|
+
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
|
813
|
+
: unordered_map(__first, __last, __n, hasher(), key_equal(), __a) {}
|
814
|
+
template <class _InputIterator>
|
815
|
+
_LIBCPP_INLINE_VISIBILITY
|
816
|
+
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
|
817
|
+
const allocator_type& __a)
|
818
|
+
: unordered_map(__first, __last, __n, __hf, key_equal(), __a) {}
|
819
|
+
_LIBCPP_INLINE_VISIBILITY
|
820
|
+
unordered_map(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
|
821
|
+
: unordered_map(__il, __n, hasher(), key_equal(), __a) {}
|
822
|
+
_LIBCPP_INLINE_VISIBILITY
|
823
|
+
unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
|
824
|
+
const allocator_type& __a)
|
825
|
+
: unordered_map(__il, __n, __hf, key_equal(), __a) {}
|
826
|
+
#endif
|
748
827
|
// ~unordered_map() = default;
|
749
828
|
_LIBCPP_INLINE_VISIBILITY
|
750
829
|
unordered_map& operator=(const unordered_map& __u)
|
@@ -1211,7 +1290,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node_with_key(key_ty
|
|
1211
1290
|
__h.get_deleter().__first_constructed = true;
|
1212
1291
|
__node_traits::construct(__na, _VSTD::addressof(__h->__value_.__cc.second));
|
1213
1292
|
__h.get_deleter().__second_constructed = true;
|
1214
|
-
return
|
1293
|
+
return __h;
|
1215
1294
|
}
|
1216
1295
|
|
1217
1296
|
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
@@ -1258,7 +1337,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node_with_key(const
|
|
1258
1337
|
__h.get_deleter().__first_constructed = true;
|
1259
1338
|
__node_traits::construct(__na, _VSTD::addressof(__h->__value_.__cc.second));
|
1260
1339
|
__h.get_deleter().__second_constructed = true;
|
1261
|
-
return _VSTD::move(__h);
|
1340
|
+
return _VSTD::move(__h); // explicitly moved for C++03
|
1262
1341
|
}
|
1263
1342
|
|
1264
1343
|
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
@@ -1366,7 +1445,7 @@ operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
|
1366
1445
|
|
1367
1446
|
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
1368
1447
|
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
1369
|
-
class
|
1448
|
+
class _LIBCPP_TYPE_VIS_ONLY unordered_multimap
|
1370
1449
|
{
|
1371
1450
|
public:
|
1372
1451
|
// types
|
@@ -1383,49 +1462,7 @@ public:
|
|
1383
1462
|
"Invalid allocator::value_type");
|
1384
1463
|
|
1385
1464
|
private:
|
1386
|
-
|
1387
|
-
union __value_type
|
1388
|
-
{
|
1389
|
-
typedef typename unordered_multimap::value_type value_type;
|
1390
|
-
typedef typename unordered_multimap::__nc_value_type __nc_value_type;
|
1391
|
-
value_type __cc;
|
1392
|
-
__nc_value_type __nc;
|
1393
|
-
|
1394
|
-
template <class ..._Args>
|
1395
|
-
__value_type(_Args&& ...__args)
|
1396
|
-
: __cc(std::forward<_Args>(__args)...) {}
|
1397
|
-
|
1398
|
-
__value_type(const __value_type& __v)
|
1399
|
-
: __cc(std::move(__v.__cc)) {}
|
1400
|
-
|
1401
|
-
__value_type(__value_type&& __v)
|
1402
|
-
: __nc(std::move(__v.__nc)) {}
|
1403
|
-
|
1404
|
-
__value_type& operator=(const __value_type& __v)
|
1405
|
-
{__nc = __v.__cc; return *this;}
|
1406
|
-
|
1407
|
-
__value_type& operator=(__value_type&& __v)
|
1408
|
-
{__nc = std::move(__v.__nc); return *this;}
|
1409
|
-
|
1410
|
-
~__value_type() {__cc.~value_type();}
|
1411
|
-
};
|
1412
|
-
#else
|
1413
|
-
struct __value_type
|
1414
|
-
{
|
1415
|
-
typedef typename unordered_multimap::value_type value_type;
|
1416
|
-
value_type __cc;
|
1417
|
-
|
1418
|
-
__value_type() {}
|
1419
|
-
|
1420
|
-
template <class _A0>
|
1421
|
-
__value_type(const _A0& __a0)
|
1422
|
-
: __cc(__a0) {}
|
1423
|
-
|
1424
|
-
template <class _A0, class _A1>
|
1425
|
-
__value_type(const _A0& __a0, const _A1& __a1)
|
1426
|
-
: __cc(__a0, __a1) {}
|
1427
|
-
};
|
1428
|
-
#endif
|
1465
|
+
typedef __hash_value_type<key_type, mapped_type> __value_type;
|
1429
1466
|
typedef __unordered_map_hasher<key_type, __value_type, hasher> __hasher;
|
1430
1467
|
typedef __unordered_map_equal<key_type, __value_type, key_equal> __key_equal;
|
1431
1468
|
typedef typename allocator_traits<allocator_type>::template
|
@@ -1499,6 +1536,30 @@ public:
|
|
1499
1536
|
const hasher& __hf, const key_equal& __eql,
|
1500
1537
|
const allocator_type& __a);
|
1501
1538
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
1539
|
+
#if _LIBCPP_STD_VER > 11
|
1540
|
+
_LIBCPP_INLINE_VISIBILITY
|
1541
|
+
unordered_multimap(size_type __n, const allocator_type& __a)
|
1542
|
+
: unordered_multimap(__n, hasher(), key_equal(), __a) {}
|
1543
|
+
_LIBCPP_INLINE_VISIBILITY
|
1544
|
+
unordered_multimap(size_type __n, const hasher& __hf, const allocator_type& __a)
|
1545
|
+
: unordered_multimap(__n, __hf, key_equal(), __a) {}
|
1546
|
+
template <class _InputIterator>
|
1547
|
+
_LIBCPP_INLINE_VISIBILITY
|
1548
|
+
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
|
1549
|
+
: unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) {}
|
1550
|
+
template <class _InputIterator>
|
1551
|
+
_LIBCPP_INLINE_VISIBILITY
|
1552
|
+
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
|
1553
|
+
const allocator_type& __a)
|
1554
|
+
: unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) {}
|
1555
|
+
_LIBCPP_INLINE_VISIBILITY
|
1556
|
+
unordered_multimap(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
|
1557
|
+
: unordered_multimap(__il, __n, hasher(), key_equal(), __a) {}
|
1558
|
+
_LIBCPP_INLINE_VISIBILITY
|
1559
|
+
unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
|
1560
|
+
const allocator_type& __a)
|
1561
|
+
: unordered_multimap(__il, __n, __hf, key_equal(), __a) {}
|
1562
|
+
#endif
|
1502
1563
|
// ~unordered_multimap() = default;
|
1503
1564
|
_LIBCPP_INLINE_VISIBILITY
|
1504
1565
|
unordered_multimap& operator=(const unordered_multimap& __u)
|
@@ -68,6 +68,16 @@ public:
|
|
68
68
|
unordered_set(initializer_list<value_type>, size_type n = 0,
|
69
69
|
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
|
70
70
|
const allocator_type& a = allocator_type());
|
71
|
+
unordered_set(size_type n, const allocator_type& a); // C++14
|
72
|
+
unordered_set(size_type n, const hasher& hf, const allocator_type& a); // C++14
|
73
|
+
template <class InputIterator>
|
74
|
+
unordered_set(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14
|
75
|
+
template <class InputIterator>
|
76
|
+
unordered_set(InputIterator f, InputIterator l, size_type n,
|
77
|
+
const hasher& hf, const allocator_type& a); // C++14
|
78
|
+
unordered_set(initializer_list<value_type> il, size_type n, const allocator_type& a); // C++14
|
79
|
+
unordered_set(initializer_list<value_type> il, size_type n,
|
80
|
+
const hasher& hf, const allocator_type& a); // C++14
|
71
81
|
~unordered_set();
|
72
82
|
unordered_set& operator=(const unordered_set&);
|
73
83
|
unordered_set& operator=(unordered_set&&)
|
@@ -207,6 +217,16 @@ public:
|
|
207
217
|
unordered_multiset(initializer_list<value_type>, size_type n = /see below/,
|
208
218
|
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
|
209
219
|
const allocator_type& a = allocator_type());
|
220
|
+
unordered_multiset(size_type n, const allocator_type& a); // C++14
|
221
|
+
unordered_multiset(size_type n, const hasher& hf, const allocator_type& a); // C++14
|
222
|
+
template <class InputIterator>
|
223
|
+
unordered_multiset(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14
|
224
|
+
template <class InputIterator>
|
225
|
+
unordered_multiset(InputIterator f, InputIterator l, size_type n,
|
226
|
+
const hasher& hf, const allocator_type& a); // C++14
|
227
|
+
unordered_multiset(initializer_list<value_type> il, size_type n, const allocator_type& a); // C++14
|
228
|
+
unordered_multiset(initializer_list<value_type> il, size_type n,
|
229
|
+
const hasher& hf, const allocator_type& a); // C++14
|
210
230
|
~unordered_multiset();
|
211
231
|
unordered_multiset& operator=(const unordered_multiset&);
|
212
232
|
unordered_multiset& operator=(unordered_multiset&&)
|
@@ -313,7 +333,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|
313
333
|
|
314
334
|
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
|
315
335
|
class _Alloc = allocator<_Value> >
|
316
|
-
class
|
336
|
+
class _LIBCPP_TYPE_VIS_ONLY unordered_set
|
317
337
|
{
|
318
338
|
public:
|
319
339
|
// types
|
@@ -353,6 +373,14 @@ public:
|
|
353
373
|
}
|
354
374
|
explicit unordered_set(size_type __n, const hasher& __hf = hasher(),
|
355
375
|
const key_equal& __eql = key_equal());
|
376
|
+
#if _LIBCPP_STD_VER > 11
|
377
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
378
|
+
unordered_set(size_type __n, const allocator_type& __a)
|
379
|
+
: unordered_set(__n, hasher(), key_equal(), __a) {}
|
380
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
381
|
+
unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a)
|
382
|
+
: unordered_set(__n, __hf, key_equal(), __a) {}
|
383
|
+
#endif
|
356
384
|
unordered_set(size_type __n, const hasher& __hf, const key_equal& __eql,
|
357
385
|
const allocator_type& __a);
|
358
386
|
template <class _InputIterator>
|
@@ -365,6 +393,17 @@ public:
|
|
365
393
|
unordered_set(_InputIterator __first, _InputIterator __last,
|
366
394
|
size_type __n, const hasher& __hf, const key_equal& __eql,
|
367
395
|
const allocator_type& __a);
|
396
|
+
#if _LIBCPP_STD_VER > 11
|
397
|
+
template <class _InputIterator>
|
398
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
399
|
+
unordered_set(_InputIterator __first, _InputIterator __last,
|
400
|
+
size_type __n, const allocator_type& __a)
|
401
|
+
: unordered_set(__first, __last, __n, hasher(), key_equal(), __a) {}
|
402
|
+
template <class _InputIterator>
|
403
|
+
unordered_set(_InputIterator __first, _InputIterator __last,
|
404
|
+
size_type __n, const hasher& __hf, const allocator_type& __a)
|
405
|
+
: unordered_set(__first, __last, __n, __hf, key_equal(), __a) {}
|
406
|
+
#endif
|
368
407
|
explicit unordered_set(const allocator_type& __a);
|
369
408
|
unordered_set(const unordered_set& __u);
|
370
409
|
unordered_set(const unordered_set& __u, const allocator_type& __a);
|
@@ -381,6 +420,16 @@ public:
|
|
381
420
|
unordered_set(initializer_list<value_type> __il, size_type __n,
|
382
421
|
const hasher& __hf, const key_equal& __eql,
|
383
422
|
const allocator_type& __a);
|
423
|
+
#if _LIBCPP_STD_VER > 11
|
424
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
425
|
+
unordered_set(initializer_list<value_type> __il, size_type __n,
|
426
|
+
const allocator_type& __a)
|
427
|
+
: unordered_set(__il, __n, hasher(), key_equal(), __a) {}
|
428
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
429
|
+
unordered_set(initializer_list<value_type> __il, size_type __n,
|
430
|
+
const hasher& __hf, const allocator_type& __a)
|
431
|
+
: unordered_set(__il, __n, __hf, key_equal(), __a) {}
|
432
|
+
#endif
|
384
433
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
385
434
|
// ~unordered_set() = default;
|
386
435
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -819,7 +868,7 @@ operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
|
819
868
|
|
820
869
|
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
|
821
870
|
class _Alloc = allocator<_Value> >
|
822
|
-
class
|
871
|
+
class _LIBCPP_TYPE_VIS_ONLY unordered_multiset
|
823
872
|
{
|
824
873
|
public:
|
825
874
|
// types
|
@@ -861,6 +910,14 @@ public:
|
|
861
910
|
const key_equal& __eql = key_equal());
|
862
911
|
unordered_multiset(size_type __n, const hasher& __hf,
|
863
912
|
const key_equal& __eql, const allocator_type& __a);
|
913
|
+
#if _LIBCPP_STD_VER > 11
|
914
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
915
|
+
unordered_multiset(size_type __n, const allocator_type& __a)
|
916
|
+
: unordered_multiset(__n, hasher(), key_equal(), __a) {}
|
917
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
918
|
+
unordered_multiset(size_type __n, const hasher& __hf, const allocator_type& __a)
|
919
|
+
: unordered_multiset(__n, __hf, key_equal(), __a) {}
|
920
|
+
#endif
|
864
921
|
template <class _InputIterator>
|
865
922
|
unordered_multiset(_InputIterator __first, _InputIterator __last);
|
866
923
|
template <class _InputIterator>
|
@@ -871,6 +928,18 @@ public:
|
|
871
928
|
unordered_multiset(_InputIterator __first, _InputIterator __last,
|
872
929
|
size_type __n , const hasher& __hf,
|
873
930
|
const key_equal& __eql, const allocator_type& __a);
|
931
|
+
#if _LIBCPP_STD_VER > 11
|
932
|
+
template <class _InputIterator>
|
933
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
934
|
+
unordered_multiset(_InputIterator __first, _InputIterator __last,
|
935
|
+
size_type __n, const allocator_type& __a)
|
936
|
+
: unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) {}
|
937
|
+
template <class _InputIterator>
|
938
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
939
|
+
unordered_multiset(_InputIterator __first, _InputIterator __last,
|
940
|
+
size_type __n, const hasher& __hf, const allocator_type& __a)
|
941
|
+
: unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) {}
|
942
|
+
#endif
|
874
943
|
explicit unordered_multiset(const allocator_type& __a);
|
875
944
|
unordered_multiset(const unordered_multiset& __u);
|
876
945
|
unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
|
@@ -887,6 +956,14 @@ public:
|
|
887
956
|
unordered_multiset(initializer_list<value_type> __il, size_type __n,
|
888
957
|
const hasher& __hf, const key_equal& __eql,
|
889
958
|
const allocator_type& __a);
|
959
|
+
#if _LIBCPP_STD_VER > 11
|
960
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
961
|
+
unordered_multiset(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
|
962
|
+
: unordered_multiset(__il, __n, hasher(), key_equal(), __a) {}
|
963
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
964
|
+
unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const allocator_type& __a)
|
965
|
+
: unordered_multiset(__il, __n, __hf, key_equal(), __a) {}
|
966
|
+
#endif
|
890
967
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
891
968
|
// ~unordered_multiset() = default;
|
892
969
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -237,7 +237,7 @@ move_if_noexcept(_Tp& __x) _NOEXCEPT
|
|
237
237
|
return _VSTD::move(__x);
|
238
238
|
}
|
239
239
|
|
240
|
-
struct
|
240
|
+
struct _LIBCPP_TYPE_VIS_ONLY piecewise_construct_t { };
|
241
241
|
#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_UTILITY)
|
242
242
|
extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
|
243
243
|
#else
|
@@ -245,7 +245,7 @@ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
|
|
245
245
|
#endif
|
246
246
|
|
247
247
|
template <class _T1, class _T2>
|
248
|
-
struct
|
248
|
+
struct _LIBCPP_TYPE_VIS_ONLY pair
|
249
249
|
{
|
250
250
|
typedef _T1 first_type;
|
251
251
|
typedef _T2 second_type;
|
@@ -462,7 +462,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
|
|
462
462
|
|
463
463
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
464
464
|
|
465
|
-
template <class _Tp> class
|
465
|
+
template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY reference_wrapper;
|
466
466
|
|
467
467
|
template <class _Tp>
|
468
468
|
struct ___make_pair_return
|
@@ -504,36 +504,36 @@ make_pair(_T1 __x, _T2 __y)
|
|
504
504
|
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
505
505
|
|
506
506
|
template <class _T1, class _T2>
|
507
|
-
class
|
507
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_size<pair<_T1, _T2> >
|
508
508
|
: public integral_constant<size_t, 2> {};
|
509
509
|
|
510
510
|
template <class _T1, class _T2>
|
511
|
-
class
|
511
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_size<const pair<_T1, _T2> >
|
512
512
|
: public integral_constant<size_t, 2> {};
|
513
513
|
|
514
514
|
template <class _T1, class _T2>
|
515
|
-
class
|
515
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_element<0, pair<_T1, _T2> >
|
516
516
|
{
|
517
517
|
public:
|
518
518
|
typedef _T1 type;
|
519
519
|
};
|
520
520
|
|
521
521
|
template <class _T1, class _T2>
|
522
|
-
class
|
522
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_element<1, pair<_T1, _T2> >
|
523
523
|
{
|
524
524
|
public:
|
525
525
|
typedef _T2 type;
|
526
526
|
};
|
527
527
|
|
528
528
|
template <class _T1, class _T2>
|
529
|
-
class
|
529
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_element<0, const pair<_T1, _T2> >
|
530
530
|
{
|
531
531
|
public:
|
532
532
|
typedef const _T1 type;
|
533
533
|
};
|
534
534
|
|
535
535
|
template <class _T1, class _T2>
|
536
|
-
class
|
536
|
+
class _LIBCPP_TYPE_VIS_ONLY tuple_element<1, const pair<_T1, _T2> >
|
537
537
|
{
|
538
538
|
public:
|
539
539
|
typedef const _T2 type;
|
@@ -594,7 +594,7 @@ struct __get_pair<1>
|
|
594
594
|
};
|
595
595
|
|
596
596
|
template <size_t _Ip, class _T1, class _T2>
|
597
|
-
_LIBCPP_INLINE_VISIBILITY
|
597
|
+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
598
598
|
typename tuple_element<_Ip, pair<_T1, _T2> >::type&
|
599
599
|
get(pair<_T1, _T2>& __p) _NOEXCEPT
|
600
600
|
{
|
@@ -602,7 +602,7 @@ get(pair<_T1, _T2>& __p) _NOEXCEPT
|
|
602
602
|
}
|
603
603
|
|
604
604
|
template <size_t _Ip, class _T1, class _T2>
|
605
|
-
_LIBCPP_INLINE_VISIBILITY
|
605
|
+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
606
606
|
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
|
607
607
|
get(const pair<_T1, _T2>& __p) _NOEXCEPT
|
608
608
|
{
|
@@ -612,7 +612,7 @@ get(const pair<_T1, _T2>& __p) _NOEXCEPT
|
|
612
612
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
613
613
|
|
614
614
|
template <size_t _Ip, class _T1, class _T2>
|
615
|
-
_LIBCPP_INLINE_VISIBILITY
|
615
|
+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
616
616
|
typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
|
617
617
|
get(pair<_T1, _T2>&& __p) _NOEXCEPT
|
618
618
|
{
|
@@ -623,42 +623,42 @@ get(pair<_T1, _T2>&& __p) _NOEXCEPT
|
|
623
623
|
|
624
624
|
#if _LIBCPP_STD_VER > 11
|
625
625
|
template <class _T1, class _T2>
|
626
|
-
_LIBCPP_INLINE_VISIBILITY
|
626
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
627
627
|
constexpr _T1 & get(pair<_T1, _T2>& __p) _NOEXCEPT
|
628
628
|
{
|
629
629
|
return __get_pair<0>::get(__p);
|
630
630
|
}
|
631
631
|
|
632
632
|
template <class _T1, class _T2>
|
633
|
-
_LIBCPP_INLINE_VISIBILITY
|
633
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
634
634
|
constexpr _T1 const & get(pair<_T1, _T2> const& __p) _NOEXCEPT
|
635
635
|
{
|
636
636
|
return __get_pair<0>::get(__p);
|
637
637
|
}
|
638
638
|
|
639
639
|
template <class _T1, class _T2>
|
640
|
-
_LIBCPP_INLINE_VISIBILITY
|
640
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
641
641
|
constexpr _T1 && get(pair<_T1, _T2>&& __p) _NOEXCEPT
|
642
642
|
{
|
643
643
|
return __get_pair<0>::get(_VSTD::move(__p));
|
644
644
|
}
|
645
645
|
|
646
646
|
template <class _T1, class _T2>
|
647
|
-
_LIBCPP_INLINE_VISIBILITY
|
647
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
648
648
|
constexpr _T1 & get(pair<_T2, _T1>& __p) _NOEXCEPT
|
649
649
|
{
|
650
650
|
return __get_pair<1>::get(__p);
|
651
651
|
}
|
652
652
|
|
653
653
|
template <class _T1, class _T2>
|
654
|
-
_LIBCPP_INLINE_VISIBILITY
|
654
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
655
655
|
constexpr _T1 const & get(pair<_T2, _T1> const& __p) _NOEXCEPT
|
656
656
|
{
|
657
657
|
return __get_pair<1>::get(__p);
|
658
658
|
}
|
659
659
|
|
660
660
|
template <class _T1, class _T2>
|
661
|
-
_LIBCPP_INLINE_VISIBILITY
|
661
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
662
662
|
constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT
|
663
663
|
{
|
664
664
|
return __get_pair<1>::get(_VSTD::move(__p));
|
@@ -669,7 +669,7 @@ constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT
|
|
669
669
|
#if _LIBCPP_STD_VER > 11
|
670
670
|
|
671
671
|
template<class _Tp, _Tp... _Ip>
|
672
|
-
struct
|
672
|
+
struct _LIBCPP_TYPE_VIS_ONLY integer_sequence
|
673
673
|
{
|
674
674
|
typedef _Tp value_type;
|
675
675
|
static_assert( is_integral<_Tp>::value,
|
@@ -754,7 +754,7 @@ template<class... _Tp>
|
|
754
754
|
|
755
755
|
#if _LIBCPP_STD_VER > 11
|
756
756
|
template<class _T1, class _T2 = _T1>
|
757
|
-
_LIBCPP_INLINE_VISIBILITY
|
757
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
758
758
|
_T1 exchange(_T1& __obj, _T2 && __new_value)
|
759
759
|
{
|
760
760
|
_T1 __old_value = _VSTD::move(__obj);
|