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.
- 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
@@ -79,8 +79,14 @@
|
|
79
79
|
# endif
|
80
80
|
# if defined(_MSC_VER) && !defined(__clang__)
|
81
81
|
# define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler
|
82
|
+
# define _LIBCPP_TOSTRING2(x) #x
|
83
|
+
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
|
84
|
+
# define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
|
85
|
+
# endif
|
86
|
+
# // If mingw not explicitly detected, assume using MS C runtime only.
|
87
|
+
# ifndef __MINGW32__
|
88
|
+
# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
|
82
89
|
# endif
|
83
|
-
# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
|
84
90
|
#endif // _WIN32
|
85
91
|
|
86
92
|
#ifdef __linux__
|
@@ -132,6 +138,9 @@
|
|
132
138
|
# define _LIBCPP_TYPE_VIS
|
133
139
|
#endif
|
134
140
|
|
141
|
+
#define _LIBCPP_TYPE_VIS_ONLY
|
142
|
+
#define _LIBCPP_FUNC_VIS_ONLY
|
143
|
+
|
135
144
|
#ifndef _LIBCPP_INLINE_VISIBILITY
|
136
145
|
# ifdef _LIBCPP_MSVC
|
137
146
|
# define _LIBCPP_INLINE_VISIBILITY __forceinline
|
@@ -172,6 +181,14 @@
|
|
172
181
|
# endif
|
173
182
|
#endif
|
174
183
|
|
184
|
+
#ifndef _LIBCPP_TYPE_VIS_ONLY
|
185
|
+
# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
|
186
|
+
#endif
|
187
|
+
|
188
|
+
#ifndef _LIBCPP_FUNC_VIS_ONLY
|
189
|
+
# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
|
190
|
+
#endif
|
191
|
+
|
175
192
|
#ifndef _LIBCPP_INLINE_VISIBILITY
|
176
193
|
#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
|
177
194
|
#endif
|
@@ -180,10 +197,6 @@
|
|
180
197
|
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
|
181
198
|
#endif
|
182
199
|
|
183
|
-
#ifndef _LIBCPP_CANTTHROW
|
184
|
-
#define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__))
|
185
|
-
#endif
|
186
|
-
|
187
200
|
#ifndef _LIBCPP_ALWAYS_INLINE
|
188
201
|
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
|
189
202
|
#endif
|
@@ -408,6 +421,7 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
|
|
408
421
|
#define _LIBCPP_HAS_NO_CONSTEXPR
|
409
422
|
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
410
423
|
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
424
|
+
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
411
425
|
#define __alignof__ __alignof
|
412
426
|
#define _LIBCPP_NORETURN __declspec(noreturn)
|
413
427
|
#define _ALIGNAS(x) __declspec(align(x))
|
@@ -420,10 +434,43 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
|
|
420
434
|
#define _LIBCPP_END_NAMESPACE_STD }
|
421
435
|
#define _VSTD std
|
422
436
|
|
437
|
+
# define _LIBCPP_WEAK
|
438
|
+
namespace std {
|
439
|
+
}
|
440
|
+
|
441
|
+
#elif defined(__IBMCPP__)
|
442
|
+
|
443
|
+
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
|
444
|
+
#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
|
445
|
+
#define _ATTRIBUTE(x) __attribute__((x))
|
446
|
+
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
447
|
+
|
448
|
+
#define _NOEXCEPT throw()
|
449
|
+
#define _NOEXCEPT_(x)
|
450
|
+
|
451
|
+
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
452
|
+
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
453
|
+
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
|
454
|
+
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
455
|
+
#define _LIBCPP_HAS_NO_NULLPTR
|
456
|
+
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
457
|
+
#define _LIBCPP_HAS_NO_STRONG_ENUMS
|
458
|
+
#define _LIBCPP_HAS_IS_BASE_OF
|
459
|
+
|
460
|
+
#if defined(_AIX)
|
461
|
+
#define __MULTILOCALE_API
|
462
|
+
#endif
|
463
|
+
|
464
|
+
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
|
465
|
+
#define _LIBCPP_END_NAMESPACE_STD } }
|
466
|
+
#define _VSTD std::_LIBCPP_NAMESPACE
|
467
|
+
|
423
468
|
namespace std {
|
469
|
+
inline namespace _LIBCPP_NAMESPACE {
|
470
|
+
}
|
424
471
|
}
|
425
472
|
|
426
|
-
#endif // __clang__ ||
|
473
|
+
#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__
|
427
474
|
|
428
475
|
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
429
476
|
typedef unsigned short char16_t;
|
@@ -486,8 +533,23 @@ template <unsigned> struct __static_assert_check {};
|
|
486
533
|
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
|
487
534
|
#endif // _LIBCPP_HAS_NO_STRONG_ENUMS
|
488
535
|
|
536
|
+
#ifdef _LIBCPP_DEBUG
|
537
|
+
# if _LIBCPP_DEBUG == 0
|
538
|
+
# define _LIBCPP_DEBUG_LEVEL 1
|
539
|
+
# elif _LIBCPP_DEBUG == 1
|
540
|
+
# define _LIBCPP_DEBUG_LEVEL 2
|
541
|
+
# else
|
542
|
+
# error Supported values for _LIBCPP_DEBUG are 0 and 1
|
543
|
+
# endif
|
544
|
+
# define _LIBCPP_EXTERN_TEMPLATE(...)
|
545
|
+
#endif
|
546
|
+
|
489
547
|
#ifndef _LIBCPP_EXTERN_TEMPLATE
|
490
|
-
#define _LIBCPP_EXTERN_TEMPLATE(...)
|
548
|
+
#define _LIBCPP_EXTERN_TEMPLATE(...)
|
549
|
+
#endif
|
550
|
+
|
551
|
+
#ifndef _LIBCPP_EXTERN_TEMPLATE2
|
552
|
+
#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
|
491
553
|
#endif
|
492
554
|
|
493
555
|
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
|
@@ -505,16 +567,6 @@ template <unsigned> struct __static_assert_check {};
|
|
505
567
|
#define _LIBCPP_WCTYPE_IS_MASK
|
506
568
|
#endif
|
507
569
|
|
508
|
-
#ifdef _LIBCPP_DEBUG2
|
509
|
-
# if _LIBCPP_DEBUG2 == 0
|
510
|
-
# define _LIBCPP_DEBUG_LEVEL 1
|
511
|
-
# elif _LIBCPP_DEBUG2 == 1
|
512
|
-
# define _LIBCPP_DEBUG_LEVEL 2
|
513
|
-
# else
|
514
|
-
# error Supported values for _LIBCPP_DEBUG2 are 0 and 1
|
515
|
-
# endif
|
516
|
-
#endif
|
517
|
-
|
518
570
|
#ifndef _LIBCPP_STD_VER
|
519
571
|
# if __cplusplus <= 201103L
|
520
572
|
# define _LIBCPP_STD_VER 11
|
@@ -523,10 +575,36 @@ template <unsigned> struct __static_assert_check {};
|
|
523
575
|
# endif
|
524
576
|
#endif // _LIBCPP_STD_VER
|
525
577
|
|
578
|
+
#if _LIBCPP_STD_VER > 11
|
579
|
+
#define _LIBCPP_DEPRECATED [[deprecated]]
|
580
|
+
#else
|
581
|
+
#define _LIBCPP_DEPRECATED
|
582
|
+
#endif
|
583
|
+
|
526
584
|
#if _LIBCPP_STD_VER <= 11
|
527
585
|
#define _LIBCPP_CONSTEXPR_AFTER_CXX11
|
586
|
+
#define _LIBCPP_EXPLICIT_AFTER_CXX11
|
587
|
+
#define _LIBCPP_DEPRECATED_AFTER_CXX11
|
528
588
|
#else
|
529
589
|
#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
|
590
|
+
#define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
|
591
|
+
#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
|
592
|
+
#endif
|
593
|
+
|
594
|
+
// Try to find out if RTTI is disabled.
|
595
|
+
// g++ and cl.exe have RTTI on by default and define a macro when it is.
|
596
|
+
// g++ only defines the macro in 4.3.2 and onwards.
|
597
|
+
#if !defined(_LIBCPP_NO_RTTI)
|
598
|
+
# if defined(__GNUG__) && (__GNUC__ >= 4 && \
|
599
|
+
(__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
|
600
|
+
# define _LIBCPP_NO_RTTI
|
601
|
+
# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
|
602
|
+
# define _LIBCPP_NO_RTTI
|
603
|
+
# endif
|
604
|
+
#endif
|
605
|
+
|
606
|
+
#ifndef _LIBCPP_WEAK
|
607
|
+
# define _LIBCPP_WEAK __attribute__((__weak__))
|
530
608
|
#endif
|
531
609
|
|
532
610
|
#endif // _LIBCPP_CONFIG
|
@@ -11,6 +11,10 @@
|
|
11
11
|
#ifndef _LIBCPP_DEBUG_H
|
12
12
|
#define _LIBCPP_DEBUG_H
|
13
13
|
|
14
|
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
15
|
+
#pragma GCC system_header
|
16
|
+
#endif
|
17
|
+
|
14
18
|
#if _LIBCPP_DEBUG_LEVEL >= 1
|
15
19
|
|
16
20
|
# include <cstdlib>
|
@@ -24,10 +28,6 @@
|
|
24
28
|
|
25
29
|
#if _LIBCPP_DEBUG_LEVEL >= 2
|
26
30
|
|
27
|
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
28
|
-
#pragma GCC system_header
|
29
|
-
#endif
|
30
|
-
|
31
31
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
32
32
|
|
33
33
|
struct _LIBCPP_TYPE_VIS __c_node;
|
@@ -38,8 +38,15 @@ struct _LIBCPP_TYPE_VIS __i_node
|
|
38
38
|
__i_node* __next_;
|
39
39
|
__c_node* __c_;
|
40
40
|
|
41
|
+
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
41
42
|
__i_node(const __i_node&) = delete;
|
42
43
|
__i_node& operator=(const __i_node&) = delete;
|
44
|
+
#else
|
45
|
+
private:
|
46
|
+
__i_node(const __i_node&);
|
47
|
+
__i_node& operator=(const __i_node&);
|
48
|
+
public:
|
49
|
+
#endif
|
43
50
|
_LIBCPP_INLINE_VISIBILITY
|
44
51
|
__i_node(void* __i, __i_node* __next, __c_node* __c)
|
45
52
|
: __i_(__i), __next_(__next), __c_(__c) {}
|
@@ -54,8 +61,15 @@ struct _LIBCPP_TYPE_VIS __c_node
|
|
54
61
|
__i_node** end_;
|
55
62
|
__i_node** cap_;
|
56
63
|
|
64
|
+
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
57
65
|
__c_node(const __c_node&) = delete;
|
58
66
|
__c_node& operator=(const __c_node&) = delete;
|
67
|
+
#else
|
68
|
+
private:
|
69
|
+
__c_node(const __c_node&);
|
70
|
+
__c_node& operator=(const __c_node&);
|
71
|
+
public:
|
72
|
+
#endif
|
59
73
|
_LIBCPP_INLINE_VISIBILITY
|
60
74
|
__c_node(void* __c, __c_node* __next)
|
61
75
|
: __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
|
@@ -134,8 +148,15 @@ class _LIBCPP_TYPE_VIS __libcpp_db
|
|
134
148
|
|
135
149
|
__libcpp_db();
|
136
150
|
public:
|
151
|
+
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
137
152
|
__libcpp_db(const __libcpp_db&) = delete;
|
138
153
|
__libcpp_db& operator=(const __libcpp_db&) = delete;
|
154
|
+
#else
|
155
|
+
private:
|
156
|
+
__libcpp_db(const __libcpp_db&);
|
157
|
+
__libcpp_db& operator=(const __libcpp_db&);
|
158
|
+
public:
|
159
|
+
#endif
|
139
160
|
~__libcpp_db();
|
140
161
|
|
141
162
|
class __db_c_iterator;
|
@@ -203,7 +203,7 @@ class _LIBCPP_EXCEPTION_ABI bad_function_call
|
|
203
203
|
{
|
204
204
|
};
|
205
205
|
|
206
|
-
template<class _Fp> class
|
206
|
+
template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
|
207
207
|
|
208
208
|
namespace __function
|
209
209
|
{
|
@@ -644,7 +644,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
|
|
644
644
|
} // __function
|
645
645
|
|
646
646
|
template<class _Rp>
|
647
|
-
class
|
647
|
+
class _LIBCPP_TYPE_VIS_ONLY function<_Rp()>
|
648
648
|
{
|
649
649
|
typedef __function::__base<_Rp()> __base;
|
650
650
|
aligned_storage<3*sizeof(void*)>::type __buf_;
|
@@ -928,7 +928,7 @@ function<_Rp()>::target() const
|
|
928
928
|
#endif // _LIBCPP_NO_RTTI
|
929
929
|
|
930
930
|
template<class _Rp, class _A0>
|
931
|
-
class
|
931
|
+
class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0)>
|
932
932
|
: public unary_function<_A0, _Rp>
|
933
933
|
{
|
934
934
|
typedef __function::__base<_Rp(_A0)> __base;
|
@@ -1230,7 +1230,7 @@ function<_Rp(_A0)>::target() const
|
|
1230
1230
|
#endif // _LIBCPP_NO_RTTI
|
1231
1231
|
|
1232
1232
|
template<class _Rp, class _A0, class _A1>
|
1233
|
-
class
|
1233
|
+
class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1)>
|
1234
1234
|
: public binary_function<_A0, _A1, _Rp>
|
1235
1235
|
{
|
1236
1236
|
typedef __function::__base<_Rp(_A0, _A1)> __base;
|
@@ -1532,7 +1532,7 @@ function<_Rp(_A0, _A1)>::target() const
|
|
1532
1532
|
#endif // _LIBCPP_NO_RTTI
|
1533
1533
|
|
1534
1534
|
template<class _Rp, class _A0, class _A1, class _A2>
|
1535
|
-
class
|
1535
|
+
class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1, _A2)>
|
1536
1536
|
{
|
1537
1537
|
typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
|
1538
1538
|
aligned_storage<3*sizeof(void*)>::type __buf_;
|
@@ -1860,11 +1860,11 @@ swap(function<_Fp>& __x, function<_Fp>& __y)
|
|
1860
1860
|
{return __x.swap(__y);}
|
1861
1861
|
|
1862
1862
|
template<class _Tp> struct __is_bind_expression : public false_type {};
|
1863
|
-
template<class _Tp> struct
|
1863
|
+
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
|
1864
1864
|
: public __is_bind_expression<typename remove_cv<_Tp>::type> {};
|
1865
1865
|
|
1866
1866
|
template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
|
1867
|
-
template<class _Tp> struct
|
1867
|
+
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
|
1868
1868
|
: public __is_placeholder<typename remove_cv<_Tp>::type> {};
|
1869
1869
|
|
1870
1870
|
namespace placeholders
|
@@ -15,6 +15,7 @@
|
|
15
15
|
#include <type_traits>
|
16
16
|
#include <typeinfo>
|
17
17
|
#include <exception>
|
18
|
+
#include <new>
|
18
19
|
|
19
20
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
20
21
|
#pragma GCC system_header
|
@@ -23,21 +24,21 @@
|
|
23
24
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
24
25
|
|
25
26
|
template <class _Arg, class _Result>
|
26
|
-
struct
|
27
|
+
struct _LIBCPP_TYPE_VIS_ONLY unary_function
|
27
28
|
{
|
28
29
|
typedef _Arg argument_type;
|
29
30
|
typedef _Result result_type;
|
30
31
|
};
|
31
32
|
|
32
33
|
template <class _Arg1, class _Arg2, class _Result>
|
33
|
-
struct
|
34
|
+
struct _LIBCPP_TYPE_VIS_ONLY binary_function
|
34
35
|
{
|
35
36
|
typedef _Arg1 first_argument_type;
|
36
37
|
typedef _Arg2 second_argument_type;
|
37
38
|
typedef _Result result_type;
|
38
39
|
};
|
39
40
|
|
40
|
-
template <class _Tp> struct
|
41
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash;
|
41
42
|
|
42
43
|
template <class _Tp>
|
43
44
|
struct __has_result_type
|
@@ -55,22 +56,75 @@ template <class _Tp = void>
|
|
55
56
|
#else
|
56
57
|
template <class _Tp>
|
57
58
|
#endif
|
58
|
-
struct
|
59
|
+
struct _LIBCPP_TYPE_VIS_ONLY less : binary_function<_Tp, _Tp, bool>
|
59
60
|
{
|
60
|
-
_LIBCPP_INLINE_VISIBILITY
|
61
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
62
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
61
63
|
{return __x < __y;}
|
62
64
|
};
|
63
65
|
|
64
66
|
#if _LIBCPP_STD_VER > 11
|
65
67
|
template <>
|
66
|
-
struct
|
68
|
+
struct _LIBCPP_TYPE_VIS_ONLY less<void>
|
67
69
|
{
|
68
|
-
template <class _T1, class _T2>
|
70
|
+
template <class _T1, class _T2>
|
71
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
69
72
|
auto operator()(_T1&& __t, _T2&& __u) const
|
70
73
|
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
|
74
|
+
typedef void is_transparent;
|
71
75
|
};
|
72
76
|
#endif
|
73
77
|
|
78
|
+
// addressof
|
79
|
+
|
80
|
+
template <class _Tp>
|
81
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
82
|
+
_Tp*
|
83
|
+
addressof(_Tp& __x) _NOEXCEPT
|
84
|
+
{
|
85
|
+
return (_Tp*)&reinterpret_cast<const volatile char&>(__x);
|
86
|
+
}
|
87
|
+
|
88
|
+
#if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF)
|
89
|
+
// Objective-C++ Automatic Reference Counting uses qualified pointers
|
90
|
+
// that require special addressof() signatures. When
|
91
|
+
// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler
|
92
|
+
// itself is providing these definitions. Otherwise, we provide them.
|
93
|
+
template <class _Tp>
|
94
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
95
|
+
__strong _Tp*
|
96
|
+
addressof(__strong _Tp& __x) _NOEXCEPT
|
97
|
+
{
|
98
|
+
return &__x;
|
99
|
+
}
|
100
|
+
|
101
|
+
#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK
|
102
|
+
template <class _Tp>
|
103
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
104
|
+
__weak _Tp*
|
105
|
+
addressof(__weak _Tp& __x) _NOEXCEPT
|
106
|
+
{
|
107
|
+
return &__x;
|
108
|
+
}
|
109
|
+
#endif
|
110
|
+
|
111
|
+
template <class _Tp>
|
112
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
113
|
+
__autoreleasing _Tp*
|
114
|
+
addressof(__autoreleasing _Tp& __x) _NOEXCEPT
|
115
|
+
{
|
116
|
+
return &__x;
|
117
|
+
}
|
118
|
+
|
119
|
+
template <class _Tp>
|
120
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
121
|
+
__unsafe_unretained _Tp*
|
122
|
+
addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT
|
123
|
+
{
|
124
|
+
return &__x;
|
125
|
+
}
|
126
|
+
#endif
|
127
|
+
|
74
128
|
#ifdef _LIBCPP_HAS_NO_VARIADICS
|
75
129
|
|
76
130
|
#include <__functional_base_03>
|
@@ -366,7 +420,7 @@ struct __invoke_return
|
|
366
420
|
};
|
367
421
|
|
368
422
|
template <class _Tp>
|
369
|
-
class
|
423
|
+
class _LIBCPP_TYPE_VIS_ONLY reference_wrapper
|
370
424
|
: public __weak_result_type<_Tp>
|
371
425
|
{
|
372
426
|
public:
|
@@ -377,7 +431,8 @@ private:
|
|
377
431
|
|
378
432
|
public:
|
379
433
|
// construct/copy/destroy
|
380
|
-
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
|
434
|
+
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
|
435
|
+
: __f_(_VSTD::addressof(__f)) {}
|
381
436
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
382
437
|
private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
|
383
438
|
#endif
|
@@ -450,6 +505,111 @@ template <class _Tp> void cref(const _Tp&&);// = delete;
|
|
450
505
|
|
451
506
|
#endif // _LIBCPP_HAS_NO_VARIADICS
|
452
507
|
|
508
|
+
#if _LIBCPP_STD_VER > 11
|
509
|
+
template <class _Tp1, class _Tp2 = void>
|
510
|
+
struct __is_transparent
|
511
|
+
{
|
512
|
+
private:
|
513
|
+
struct __two {char __lx; char __lxx;};
|
514
|
+
template <class _Up> static __two __test(...);
|
515
|
+
template <class _Up> static char __test(typename _Up::is_transparent* = 0);
|
516
|
+
public:
|
517
|
+
static const bool value = sizeof(__test<_Tp1>(0)) == 1;
|
518
|
+
};
|
519
|
+
#endif
|
520
|
+
|
521
|
+
// allocator_arg_t
|
522
|
+
|
523
|
+
struct _LIBCPP_TYPE_VIS_ONLY allocator_arg_t { };
|
524
|
+
|
525
|
+
#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MEMORY)
|
526
|
+
extern const allocator_arg_t allocator_arg;
|
527
|
+
#else
|
528
|
+
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
|
529
|
+
#endif
|
530
|
+
|
531
|
+
// uses_allocator
|
532
|
+
|
533
|
+
template <class _Tp>
|
534
|
+
struct __has_allocator_type
|
535
|
+
{
|
536
|
+
private:
|
537
|
+
struct __two {char __lx; char __lxx;};
|
538
|
+
template <class _Up> static __two __test(...);
|
539
|
+
template <class _Up> static char __test(typename _Up::allocator_type* = 0);
|
540
|
+
public:
|
541
|
+
static const bool value = sizeof(__test<_Tp>(0)) == 1;
|
542
|
+
};
|
543
|
+
|
544
|
+
template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value>
|
545
|
+
struct __uses_allocator
|
546
|
+
: public integral_constant<bool,
|
547
|
+
is_convertible<_Alloc, typename _Tp::allocator_type>::value>
|
548
|
+
{
|
549
|
+
};
|
550
|
+
|
551
|
+
template <class _Tp, class _Alloc>
|
552
|
+
struct __uses_allocator<_Tp, _Alloc, false>
|
553
|
+
: public false_type
|
554
|
+
{
|
555
|
+
};
|
556
|
+
|
557
|
+
template <class _Tp, class _Alloc>
|
558
|
+
struct _LIBCPP_TYPE_VIS_ONLY uses_allocator
|
559
|
+
: public __uses_allocator<_Tp, _Alloc>
|
560
|
+
{
|
561
|
+
};
|
562
|
+
|
563
|
+
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
564
|
+
|
565
|
+
// allocator construction
|
566
|
+
|
567
|
+
template <class _Tp, class _Alloc, class ..._Args>
|
568
|
+
struct __uses_alloc_ctor_imp
|
569
|
+
{
|
570
|
+
static const bool __ua = uses_allocator<_Tp, _Alloc>::value;
|
571
|
+
static const bool __ic =
|
572
|
+
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
|
573
|
+
static const int value = __ua ? 2 - __ic : 0;
|
574
|
+
};
|
575
|
+
|
576
|
+
template <class _Tp, class _Alloc, class ..._Args>
|
577
|
+
struct __uses_alloc_ctor
|
578
|
+
: integral_constant<int, __uses_alloc_ctor_imp<_Tp, _Alloc, _Args...>::value>
|
579
|
+
{};
|
580
|
+
|
581
|
+
template <class _Tp, class _Allocator, class... _Args>
|
582
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
583
|
+
void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
|
584
|
+
{
|
585
|
+
new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
|
586
|
+
}
|
587
|
+
|
588
|
+
template <class _Tp, class _Allocator, class... _Args>
|
589
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
590
|
+
void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
591
|
+
{
|
592
|
+
new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
|
593
|
+
}
|
594
|
+
|
595
|
+
template <class _Tp, class _Allocator, class... _Args>
|
596
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
597
|
+
void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
598
|
+
{
|
599
|
+
new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
|
600
|
+
}
|
601
|
+
|
602
|
+
template <class _Tp, class _Allocator, class... _Args>
|
603
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
604
|
+
void __user_alloc_construct (_Tp *__storage, const _Allocator &__a, _Args &&... __args)
|
605
|
+
{
|
606
|
+
__user_alloc_construct_impl(
|
607
|
+
__uses_alloc_ctor<_Tp, _Allocator>(),
|
608
|
+
__storage, __a, _VSTD::forward<_Args>(__args)...
|
609
|
+
);
|
610
|
+
}
|
611
|
+
#endif // _LIBCPP_HAS_NO_VARIADICS
|
612
|
+
|
453
613
|
_LIBCPP_END_NAMESPACE_STD
|
454
614
|
|
455
615
|
#endif // _LIBCPP_FUNCTIONAL_BASE
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
#include <__undef_min_max>
|
22
22
|
|
23
|
-
#ifdef
|
23
|
+
#ifdef _LIBCPP_DEBUG
|
24
24
|
# include <__debug>
|
25
25
|
#else
|
26
26
|
# define _LIBCPP_ASSERT(x, m) ((void)0)
|
@@ -85,14 +85,14 @@ __next_pow2(size_t __n)
|
|
85
85
|
}
|
86
86
|
|
87
87
|
template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
|
88
|
-
template <class _ConstNodePtr> class
|
89
|
-
template <class _HashIterator> class
|
90
|
-
template <class _HashIterator> class
|
88
|
+
template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
|
89
|
+
template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
|
90
|
+
template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
|
91
91
|
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
92
|
-
class
|
92
|
+
class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
93
93
|
|
94
94
|
template <class _NodePtr>
|
95
|
-
class
|
95
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_iterator
|
96
96
|
{
|
97
97
|
typedef _NodePtr __node_pointer;
|
98
98
|
|
@@ -212,14 +212,14 @@ private:
|
|
212
212
|
#endif
|
213
213
|
|
214
214
|
template <class, class, class, class> friend class __hash_table;
|
215
|
-
template <class> friend class
|
216
|
-
template <class> friend class
|
217
|
-
template <class, class, class, class, class> friend class
|
218
|
-
template <class, class, class, class, class> friend class
|
215
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
|
216
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
|
217
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
218
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
|
219
219
|
};
|
220
220
|
|
221
221
|
template <class _ConstNodePtr>
|
222
|
-
class
|
222
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator
|
223
223
|
{
|
224
224
|
typedef _ConstNodePtr __node_pointer;
|
225
225
|
|
@@ -359,15 +359,15 @@ private:
|
|
359
359
|
#endif
|
360
360
|
|
361
361
|
template <class, class, class, class> friend class __hash_table;
|
362
|
-
template <class> friend class
|
363
|
-
template <class, class, class, class, class> friend class
|
364
|
-
template <class, class, class, class, class> friend class
|
362
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
|
363
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
364
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
|
365
365
|
};
|
366
366
|
|
367
|
-
template <class _ConstNodePtr> class
|
367
|
+
template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
|
368
368
|
|
369
369
|
template <class _NodePtr>
|
370
|
-
class
|
370
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_local_iterator
|
371
371
|
{
|
372
372
|
typedef _NodePtr __node_pointer;
|
373
373
|
|
@@ -503,12 +503,12 @@ private:
|
|
503
503
|
}
|
504
504
|
#endif
|
505
505
|
template <class, class, class, class> friend class __hash_table;
|
506
|
-
template <class> friend class
|
507
|
-
template <class> friend class
|
506
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
|
507
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
|
508
508
|
};
|
509
509
|
|
510
510
|
template <class _ConstNodePtr>
|
511
|
-
class
|
511
|
+
class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator
|
512
512
|
{
|
513
513
|
typedef _ConstNodePtr __node_pointer;
|
514
514
|
|
@@ -668,7 +668,7 @@ private:
|
|
668
668
|
}
|
669
669
|
#endif
|
670
670
|
template <class, class, class, class> friend class __hash_table;
|
671
|
-
template <class> friend class
|
671
|
+
template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
|
672
672
|
};
|
673
673
|
|
674
674
|
template <class _Alloc>
|
@@ -1160,8 +1160,8 @@ private:
|
|
1160
1160
|
void __deallocate(__node_pointer __np) _NOEXCEPT;
|
1161
1161
|
__node_pointer __detach() _NOEXCEPT;
|
1162
1162
|
|
1163
|
-
template <class, class, class, class, class> friend class
|
1164
|
-
template <class, class, class, class, class> friend class
|
1163
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
|
1164
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
|
1165
1165
|
};
|
1166
1166
|
|
1167
1167
|
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
@@ -2101,7 +2101,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
|
2101
2101
|
__h.get_deleter().__value_constructed = true;
|
2102
2102
|
__h->__hash_ = __hash;
|
2103
2103
|
__h->__next_ = nullptr;
|
2104
|
-
return
|
2104
|
+
return __h;
|
2105
2105
|
}
|
2106
2106
|
|
2107
2107
|
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
@@ -2116,7 +2116,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
|
2116
2116
|
__h.get_deleter().__value_constructed = true;
|
2117
2117
|
__h->__hash_ = hash_function()(__h->__value_);
|
2118
2118
|
__h->__next_ = nullptr;
|
2119
|
-
return _VSTD::move(__h);
|
2119
|
+
return _VSTD::move(__h); // explicitly moved for C++03
|
2120
2120
|
}
|
2121
2121
|
|
2122
2122
|
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
@@ -2132,7 +2132,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
|
2132
2132
|
__h.get_deleter().__value_constructed = true;
|
2133
2133
|
__h->__hash_ = __hash;
|
2134
2134
|
__h->__next_ = nullptr;
|
2135
|
-
return _VSTD::move(__h);
|
2135
|
+
return _VSTD::move(__h); // explicitly moved for C++03
|
2136
2136
|
}
|
2137
2137
|
|
2138
2138
|
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|