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
@@ -255,13 +255,13 @@ template<class T, class charT, class traits>
|
|
255
255
|
|
256
256
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
257
257
|
|
258
|
-
template<class _Tp> class
|
258
|
+
template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY complex;
|
259
259
|
|
260
260
|
template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
|
261
261
|
template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
|
262
262
|
|
263
263
|
template<class _Tp>
|
264
|
-
class
|
264
|
+
class _LIBCPP_TYPE_VIS_ONLY complex
|
265
265
|
{
|
266
266
|
public:
|
267
267
|
typedef _Tp value_type;
|
@@ -319,11 +319,11 @@ public:
|
|
319
319
|
}
|
320
320
|
};
|
321
321
|
|
322
|
-
template<> class
|
323
|
-
template<> class
|
322
|
+
template<> class _LIBCPP_TYPE_VIS_ONLY complex<double>;
|
323
|
+
template<> class _LIBCPP_TYPE_VIS_ONLY complex<long double>;
|
324
324
|
|
325
325
|
template<>
|
326
|
-
class
|
326
|
+
class _LIBCPP_TYPE_VIS_ONLY complex<float>
|
327
327
|
{
|
328
328
|
float __re_;
|
329
329
|
float __im_;
|
@@ -379,7 +379,7 @@ public:
|
|
379
379
|
};
|
380
380
|
|
381
381
|
template<>
|
382
|
-
class
|
382
|
+
class _LIBCPP_TYPE_VIS_ONLY complex<double>
|
383
383
|
{
|
384
384
|
double __re_;
|
385
385
|
double __im_;
|
@@ -435,7 +435,7 @@ public:
|
|
435
435
|
};
|
436
436
|
|
437
437
|
template<>
|
438
|
-
class
|
438
|
+
class _LIBCPP_TYPE_VIS_ONLY complex<long double>
|
439
439
|
{
|
440
440
|
long double __re_;
|
441
441
|
long double __im_;
|
@@ -1521,6 +1521,47 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
|
|
1521
1521
|
return __os << __s.str();
|
1522
1522
|
}
|
1523
1523
|
|
1524
|
+
#if _LIBCPP_STD_VER > 11
|
1525
|
+
// Literal suffix for complex number literals [complex.literals]
|
1526
|
+
inline namespace literals
|
1527
|
+
{
|
1528
|
+
inline namespace complex_literals
|
1529
|
+
{
|
1530
|
+
constexpr complex<long double> operator""il(long double __im)
|
1531
|
+
{
|
1532
|
+
return { 0.0l, __im };
|
1533
|
+
}
|
1534
|
+
|
1535
|
+
constexpr complex<long double> operator""il(unsigned long long __im)
|
1536
|
+
{
|
1537
|
+
return { 0.0l, static_cast<long double>(__im) };
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
|
1541
|
+
constexpr complex<double> operator""i(long double __im)
|
1542
|
+
{
|
1543
|
+
return { 0.0, static_cast<double>(__im) };
|
1544
|
+
}
|
1545
|
+
|
1546
|
+
constexpr complex<double> operator""i(unsigned long long __im)
|
1547
|
+
{
|
1548
|
+
return { 0.0, static_cast<double>(__im) };
|
1549
|
+
}
|
1550
|
+
|
1551
|
+
|
1552
|
+
constexpr complex<float> operator""if(long double __im)
|
1553
|
+
{
|
1554
|
+
return { 0.0f, static_cast<float>(__im) };
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
constexpr complex<float> operator""if(unsigned long long __im)
|
1558
|
+
{
|
1559
|
+
return { 0.0f, static_cast<float>(__im) };
|
1560
|
+
}
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
#endif
|
1564
|
+
|
1524
1565
|
_LIBCPP_END_NAMESPACE_STD
|
1525
1566
|
|
1526
1567
|
#endif // _LIBCPP_COMPLEX
|
@@ -74,7 +74,7 @@ int fputc(int c, FILE* stream);
|
|
74
74
|
int fputs(const char* restrict s, FILE* restrict stream);
|
75
75
|
int getc(FILE* stream);
|
76
76
|
int getchar(void);
|
77
|
-
char* gets(char* s);
|
77
|
+
char* gets(char* s); // removed in C++14
|
78
78
|
int putc(int c, FILE* stream);
|
79
79
|
int putchar(int c);
|
80
80
|
int puts(const char* s);
|
@@ -103,6 +103,11 @@ void perror(const char* s);
|
|
103
103
|
#pragma GCC system_header
|
104
104
|
#endif
|
105
105
|
|
106
|
+
// snprintf
|
107
|
+
#if defined(_LIBCPP_MSVCRT)
|
108
|
+
#include "support/win32/support.h"
|
109
|
+
#endif
|
110
|
+
|
106
111
|
#ifdef getc
|
107
112
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_getc(FILE* __stream) {return getc(__stream);}
|
108
113
|
#undef getc
|
@@ -153,7 +158,9 @@ using ::fputc;
|
|
153
158
|
using ::fputs;
|
154
159
|
using ::getc;
|
155
160
|
using ::getchar;
|
161
|
+
#if _LIBCPP_STD_VER <= 11
|
156
162
|
using ::gets;
|
163
|
+
#endif
|
157
164
|
using ::putc;
|
158
165
|
using ::putchar;
|
159
166
|
using ::puts;
|
@@ -155,7 +155,7 @@ using ::aligned_alloc;
|
|
155
155
|
#endif
|
156
156
|
|
157
157
|
// MSVCRT already has the correct prototype in <stdlib.h> #ifdef __cplusplus
|
158
|
-
#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__)
|
158
|
+
#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__) && !defined(_AIX)
|
159
159
|
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
|
160
160
|
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
161
161
|
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
|
@@ -106,7 +106,7 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
|
|
106
106
|
#include <__config>
|
107
107
|
#include <cwctype>
|
108
108
|
#include <wchar.h>
|
109
|
-
#
|
109
|
+
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
|
110
110
|
#include <support/win32/support.h> // pull in *swprintf defines
|
111
111
|
#endif // _LIBCPP_MSVCRT
|
112
112
|
|
@@ -41,6 +41,7 @@ public:
|
|
41
41
|
deque() noexcept(is_nothrow_default_constructible<allocator_type>::value);
|
42
42
|
explicit deque(const allocator_type& a);
|
43
43
|
explicit deque(size_type n);
|
44
|
+
explicit deque(size_type n, const allocator_type& a); // C++14
|
44
45
|
deque(size_type n, const value_type& v);
|
45
46
|
deque(size_type n, const value_type& v, const allocator_type& a);
|
46
47
|
template <class InputIterator>
|
@@ -170,7 +171,7 @@ template <class _Tp, class _Allocator> class __deque_base;
|
|
170
171
|
|
171
172
|
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
|
172
173
|
class _DiffType, _DiffType _BlockSize>
|
173
|
-
class
|
174
|
+
class _LIBCPP_TYPE_VIS_ONLY __deque_iterator;
|
174
175
|
|
175
176
|
template <class _RAIter,
|
176
177
|
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
|
@@ -262,7 +263,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
|
|
262
263
|
|
263
264
|
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
|
264
265
|
class _DiffType, _DiffType _BlockSize>
|
265
|
-
class
|
266
|
+
class _LIBCPP_TYPE_VIS_ONLY __deque_iterator
|
266
267
|
{
|
267
268
|
typedef _MapPointer __map_iterator;
|
268
269
|
public:
|
@@ -414,9 +415,9 @@ private:
|
|
414
415
|
: __m_iter_(__m), __ptr_(__p) {}
|
415
416
|
|
416
417
|
template <class _Tp, class _Ap> friend class __deque_base;
|
417
|
-
template <class _Tp, class _Ap> friend class
|
418
|
+
template <class _Tp, class _Ap> friend class _LIBCPP_TYPE_VIS_ONLY deque;
|
418
419
|
template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp>
|
419
|
-
friend class
|
420
|
+
friend class _LIBCPP_TYPE_VIS_ONLY __deque_iterator;
|
420
421
|
|
421
422
|
template <class _RAIter,
|
422
423
|
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
|
@@ -1178,7 +1179,7 @@ __deque_base<_Tp, _Allocator>::clear() _NOEXCEPT
|
|
1178
1179
|
}
|
1179
1180
|
|
1180
1181
|
template <class _Tp, class _Allocator = allocator<_Tp> >
|
1181
|
-
class
|
1182
|
+
class _LIBCPP_TYPE_VIS_ONLY deque
|
1182
1183
|
: private __deque_base<_Tp, _Allocator>
|
1183
1184
|
{
|
1184
1185
|
public:
|
@@ -1209,6 +1210,9 @@ public:
|
|
1209
1210
|
{}
|
1210
1211
|
_LIBCPP_INLINE_VISIBILITY deque(const allocator_type& __a) : __base(__a) {}
|
1211
1212
|
explicit deque(size_type __n);
|
1213
|
+
#if _LIBCPP_STD_VER > 11
|
1214
|
+
explicit deque(size_type __n, const _Allocator& __a);
|
1215
|
+
#endif
|
1212
1216
|
deque(size_type __n, const value_type& __v);
|
1213
1217
|
deque(size_type __n, const value_type& __v, const allocator_type& __a);
|
1214
1218
|
template <class _InputIter>
|
@@ -1431,6 +1435,16 @@ deque<_Tp, _Allocator>::deque(size_type __n)
|
|
1431
1435
|
__append(__n);
|
1432
1436
|
}
|
1433
1437
|
|
1438
|
+
#if _LIBCPP_STD_VER > 11
|
1439
|
+
template <class _Tp, class _Allocator>
|
1440
|
+
deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
|
1441
|
+
: __base(__a)
|
1442
|
+
{
|
1443
|
+
if (__n > 0)
|
1444
|
+
__append(__n);
|
1445
|
+
}
|
1446
|
+
#endif
|
1447
|
+
|
1434
1448
|
template <class _Tp, class _Allocator>
|
1435
1449
|
deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v)
|
1436
1450
|
{
|
@@ -2797,7 +2811,7 @@ deque<_Tp, _Allocator>::clear() _NOEXCEPT
|
|
2797
2811
|
}
|
2798
2812
|
|
2799
2813
|
template <class _Tp, class _Allocator>
|
2800
|
-
_LIBCPP_INLINE_VISIBILITY
|
2814
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2801
2815
|
bool
|
2802
2816
|
operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2803
2817
|
{
|
@@ -2806,7 +2820,7 @@ operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2806
2820
|
}
|
2807
2821
|
|
2808
2822
|
template <class _Tp, class _Allocator>
|
2809
|
-
_LIBCPP_INLINE_VISIBILITY
|
2823
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2810
2824
|
bool
|
2811
2825
|
operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2812
2826
|
{
|
@@ -2814,7 +2828,7 @@ operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2814
2828
|
}
|
2815
2829
|
|
2816
2830
|
template <class _Tp, class _Allocator>
|
2817
|
-
_LIBCPP_INLINE_VISIBILITY
|
2831
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2818
2832
|
bool
|
2819
2833
|
operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2820
2834
|
{
|
@@ -2822,7 +2836,7 @@ operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2822
2836
|
}
|
2823
2837
|
|
2824
2838
|
template <class _Tp, class _Allocator>
|
2825
|
-
_LIBCPP_INLINE_VISIBILITY
|
2839
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2826
2840
|
bool
|
2827
2841
|
operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2828
2842
|
{
|
@@ -2830,7 +2844,7 @@ operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2830
2844
|
}
|
2831
2845
|
|
2832
2846
|
template <class _Tp, class _Allocator>
|
2833
|
-
_LIBCPP_INLINE_VISIBILITY
|
2847
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2834
2848
|
bool
|
2835
2849
|
operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2836
2850
|
{
|
@@ -2838,7 +2852,7 @@ operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2838
2852
|
}
|
2839
2853
|
|
2840
2854
|
template <class _Tp, class _Allocator>
|
2841
|
-
_LIBCPP_INLINE_VISIBILITY
|
2855
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2842
2856
|
bool
|
2843
2857
|
operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
2844
2858
|
{
|
@@ -2846,7 +2860,7 @@ operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
|
|
2846
2860
|
}
|
2847
2861
|
|
2848
2862
|
template <class _Tp, class _Allocator>
|
2849
|
-
_LIBCPP_INLINE_VISIBILITY
|
2863
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
2850
2864
|
void
|
2851
2865
|
swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
|
2852
2866
|
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
|
@@ -0,0 +1,311 @@
|
|
1
|
+
// -*- C++ -*-
|
2
|
+
//===-------------------------- dynarray ----------------------------------===//
|
3
|
+
//
|
4
|
+
// The LLVM Compiler Infrastructure
|
5
|
+
//
|
6
|
+
// This file is dual licensed under the MIT and the University of Illinois Open
|
7
|
+
// Source Licenses. See LICENSE.TXT for details.
|
8
|
+
//
|
9
|
+
//===----------------------------------------------------------------------===//
|
10
|
+
|
11
|
+
#ifndef _LIBCPP_DYNARRAY
|
12
|
+
#define _LIBCPP_DYNARRAY
|
13
|
+
|
14
|
+
#include <__config>
|
15
|
+
#if _LIBCPP_STD_VER > 11
|
16
|
+
|
17
|
+
/*
|
18
|
+
dynarray synopsis
|
19
|
+
|
20
|
+
namespace std {
|
21
|
+
|
22
|
+
template< typename T >
|
23
|
+
class dynarray
|
24
|
+
{
|
25
|
+
// types:
|
26
|
+
typedef T value_type;
|
27
|
+
typedef T& reference;
|
28
|
+
typedef const T& const_reference;
|
29
|
+
typedef T* pointer;
|
30
|
+
typedef const T* const_pointer;
|
31
|
+
typedef implementation-defined iterator;
|
32
|
+
typedef implementation-defined const_iterator;
|
33
|
+
typedef reverse_iterator<iterator> reverse_iterator;
|
34
|
+
typedef reverse_iterator<const_iterator> const_reverse_iterator;
|
35
|
+
typedef size_t size_type;
|
36
|
+
typedef ptrdiff_t difference_type;
|
37
|
+
|
38
|
+
public:
|
39
|
+
// construct/copy/destroy:
|
40
|
+
explicit dynarray(size_type c);
|
41
|
+
template <typename Alloc>
|
42
|
+
dynarray(size_type c, const Alloc& alloc);
|
43
|
+
dynarray(size_type c, const T& v);
|
44
|
+
template <typename Alloc>
|
45
|
+
dynarray(size_type c, const T& v, const Alloc& alloc);
|
46
|
+
dynarray(const dynarray& d);
|
47
|
+
template <typename Alloc>
|
48
|
+
dynarray(const dynarray& d, const Alloc& alloc);
|
49
|
+
dynarray(initializer_list<T>);
|
50
|
+
template <typename Alloc>
|
51
|
+
dynarray(initializer_list<T>, const Alloc& alloc);
|
52
|
+
|
53
|
+
dynarray& operator=(const dynarray&) = delete;
|
54
|
+
~dynarray();
|
55
|
+
|
56
|
+
// iterators:
|
57
|
+
iterator begin() noexcept;
|
58
|
+
const_iterator begin() const noexcept;
|
59
|
+
const_iterator cbegin() const noexcept;
|
60
|
+
iterator end() noexcept;
|
61
|
+
const_iterator end() const noexcept;
|
62
|
+
const_iterator cend() const noexcept;
|
63
|
+
|
64
|
+
reverse_iterator rbegin() noexcept;
|
65
|
+
const_reverse_iterator rbegin() const noexcept;
|
66
|
+
const_reverse_iterator crbegin() const noexcept;
|
67
|
+
reverse_iterator rend() noexcept;
|
68
|
+
const_reverse_iterator rend() const noexcept;
|
69
|
+
const_reverse_iterator crend() const noexcept;
|
70
|
+
|
71
|
+
// capacity:
|
72
|
+
size_type size() const noexcept;
|
73
|
+
size_type max_size() const noexcept;
|
74
|
+
bool empty() const noexcept;
|
75
|
+
|
76
|
+
// element access:
|
77
|
+
reference operator[](size_type n);
|
78
|
+
const_reference operator[](size_type n) const;
|
79
|
+
|
80
|
+
reference front();
|
81
|
+
const_reference front() const;
|
82
|
+
reference back();
|
83
|
+
const_reference back() const;
|
84
|
+
|
85
|
+
const_reference at(size_type n) const;
|
86
|
+
reference at(size_type n);
|
87
|
+
|
88
|
+
// data access:
|
89
|
+
T* data() noexcept;
|
90
|
+
const T* data() const noexcept;
|
91
|
+
|
92
|
+
// mutating member functions:
|
93
|
+
void fill(const T& v);
|
94
|
+
};
|
95
|
+
|
96
|
+
} // std
|
97
|
+
|
98
|
+
*/
|
99
|
+
|
100
|
+
#include <__functional_base>
|
101
|
+
#include <iterator>
|
102
|
+
#include <stdexcept>
|
103
|
+
#include <initializer_list>
|
104
|
+
#include <new>
|
105
|
+
#include <algorithm>
|
106
|
+
|
107
|
+
#if defined(_LIBCPP_NO_EXCEPTIONS)
|
108
|
+
#include <cassert>
|
109
|
+
#endif
|
110
|
+
|
111
|
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
112
|
+
#pragma GCC system_header
|
113
|
+
#endif
|
114
|
+
|
115
|
+
_LIBCPP_BEGIN_NAMESPACE_STD
|
116
|
+
|
117
|
+
template <class _Tp>
|
118
|
+
struct _LIBCPP_TYPE_VIS_ONLY dynarray
|
119
|
+
{
|
120
|
+
public:
|
121
|
+
// types:
|
122
|
+
typedef dynarray __self;
|
123
|
+
typedef _Tp value_type;
|
124
|
+
typedef value_type& reference;
|
125
|
+
typedef const value_type& const_reference;
|
126
|
+
typedef value_type* iterator;
|
127
|
+
typedef const value_type* const_iterator;
|
128
|
+
typedef value_type* pointer;
|
129
|
+
typedef const value_type* const_pointer;
|
130
|
+
typedef size_t size_type;
|
131
|
+
typedef ptrdiff_t difference_type;
|
132
|
+
typedef std::reverse_iterator<iterator> reverse_iterator;
|
133
|
+
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
134
|
+
|
135
|
+
private:
|
136
|
+
size_t __size_;
|
137
|
+
value_type * __base_;
|
138
|
+
_LIBCPP_ALWAYS_INLINE dynarray () noexcept : __base_(nullptr), __size_(0) {}
|
139
|
+
|
140
|
+
static inline _LIBCPP_INLINE_VISIBILITY value_type* __allocate ( size_t count )
|
141
|
+
{
|
142
|
+
if ( numeric_limits<size_t>::max() / sizeof (value_type) <= count )
|
143
|
+
{
|
144
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
145
|
+
throw bad_array_length();
|
146
|
+
#else
|
147
|
+
assert(!"dynarray::allocation");
|
148
|
+
#endif
|
149
|
+
}
|
150
|
+
return static_cast<value_type *> (::operator new (sizeof(value_type) * count));
|
151
|
+
}
|
152
|
+
|
153
|
+
static inline _LIBCPP_INLINE_VISIBILITY void __deallocate ( value_type* __ptr ) noexcept
|
154
|
+
{
|
155
|
+
::operator delete (static_cast<void *> (__ptr));
|
156
|
+
}
|
157
|
+
|
158
|
+
public:
|
159
|
+
|
160
|
+
explicit dynarray(size_type __c);
|
161
|
+
dynarray(size_type __c, const value_type& __v);
|
162
|
+
dynarray(const dynarray& __d);
|
163
|
+
dynarray(initializer_list<value_type>);
|
164
|
+
|
165
|
+
// We're not implementing these right now.
|
166
|
+
// Waiting for the resolution of LWG issue #2235
|
167
|
+
// template <typename _Alloc>
|
168
|
+
// dynarray(size_type __c, const _Alloc& __alloc);
|
169
|
+
// template <typename _Alloc>
|
170
|
+
// dynarray(size_type __c, const value_type& __v, const _Alloc& __alloc);
|
171
|
+
// template <typename _Alloc>
|
172
|
+
// dynarray(const dynarray& __d, const _Alloc& __alloc);
|
173
|
+
// template <typename _Alloc>
|
174
|
+
// dynarray(initializer_list<value_type>, const _Alloc& __alloc);
|
175
|
+
|
176
|
+
dynarray& operator=(const dynarray&) = delete;
|
177
|
+
~dynarray();
|
178
|
+
|
179
|
+
// iterators:
|
180
|
+
inline _LIBCPP_INLINE_VISIBILITY iterator begin() noexcept { return iterator(data()); }
|
181
|
+
inline _LIBCPP_INLINE_VISIBILITY const_iterator begin() const noexcept { return const_iterator(data()); }
|
182
|
+
inline _LIBCPP_INLINE_VISIBILITY const_iterator cbegin() const noexcept { return const_iterator(data()); }
|
183
|
+
inline _LIBCPP_INLINE_VISIBILITY iterator end() noexcept { return iterator(data() + __size_); }
|
184
|
+
inline _LIBCPP_INLINE_VISIBILITY const_iterator end() const noexcept { return const_iterator(data() + __size_); }
|
185
|
+
inline _LIBCPP_INLINE_VISIBILITY const_iterator cend() const noexcept { return const_iterator(data() + __size_); }
|
186
|
+
|
187
|
+
inline _LIBCPP_INLINE_VISIBILITY reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
|
188
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
|
189
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
|
190
|
+
inline _LIBCPP_INLINE_VISIBILITY reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
|
191
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
|
192
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
|
193
|
+
|
194
|
+
// capacity:
|
195
|
+
inline _LIBCPP_INLINE_VISIBILITY size_type size() const noexcept { return __size_; }
|
196
|
+
inline _LIBCPP_INLINE_VISIBILITY size_type max_size() const noexcept { return __size_; }
|
197
|
+
inline _LIBCPP_INLINE_VISIBILITY bool empty() const noexcept { return __size_ == 0; }
|
198
|
+
|
199
|
+
// element access:
|
200
|
+
inline _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) { return data()[__n]; }
|
201
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const { return data()[__n]; }
|
202
|
+
|
203
|
+
inline _LIBCPP_INLINE_VISIBILITY reference front() { return data()[0]; }
|
204
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reference front() const { return data()[0]; }
|
205
|
+
inline _LIBCPP_INLINE_VISIBILITY reference back() { return data()[__size_-1]; }
|
206
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reference back() const { return data()[__size_-1]; }
|
207
|
+
|
208
|
+
inline _LIBCPP_INLINE_VISIBILITY const_reference at(size_type __n) const;
|
209
|
+
inline _LIBCPP_INLINE_VISIBILITY reference at(size_type __n);
|
210
|
+
|
211
|
+
// data access:
|
212
|
+
inline _LIBCPP_INLINE_VISIBILITY _Tp* data() noexcept { return __base_; }
|
213
|
+
inline _LIBCPP_INLINE_VISIBILITY const _Tp* data() const noexcept { return __base_; }
|
214
|
+
|
215
|
+
// mutating member functions:
|
216
|
+
inline _LIBCPP_INLINE_VISIBILITY void fill(const value_type& __v) { fill_n(begin(), __size_, __v); }
|
217
|
+
};
|
218
|
+
|
219
|
+
template <class _Tp>
|
220
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
221
|
+
dynarray<_Tp>::dynarray(size_type __c) : dynarray ()
|
222
|
+
{
|
223
|
+
__base_ = __allocate (__c);
|
224
|
+
value_type *__data = data ();
|
225
|
+
for ( __size_ = 0; __size_ < __c; ++__size_, ++__data )
|
226
|
+
::new (__data) value_type;
|
227
|
+
}
|
228
|
+
|
229
|
+
template <class _Tp>
|
230
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
231
|
+
dynarray<_Tp>::dynarray(size_type __c, const value_type& __v) : dynarray ()
|
232
|
+
{
|
233
|
+
__base_ = __allocate (__c);
|
234
|
+
value_type *__data = data ();
|
235
|
+
for ( __size_ = 0; __size_ < __c; ++__size_, ++__data )
|
236
|
+
::new (__data) value_type (__v);
|
237
|
+
}
|
238
|
+
|
239
|
+
template <class _Tp>
|
240
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
241
|
+
dynarray<_Tp>::dynarray(initializer_list<value_type> __il) : dynarray ()
|
242
|
+
{
|
243
|
+
size_t sz = __il.size();
|
244
|
+
__base_ = __allocate (sz);
|
245
|
+
value_type *__data = data ();
|
246
|
+
auto src = __il.begin();
|
247
|
+
for ( __size_ = 0; __size_ < sz; ++__size_, ++__data, ++src )
|
248
|
+
::new (__data) value_type (*src);
|
249
|
+
}
|
250
|
+
|
251
|
+
template <class _Tp>
|
252
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
253
|
+
dynarray<_Tp>::dynarray(const dynarray& __d) : dynarray ()
|
254
|
+
{
|
255
|
+
size_t sz = __d.size();
|
256
|
+
__base_ = __allocate (sz);
|
257
|
+
value_type *__data = data ();
|
258
|
+
auto src = __d.begin();
|
259
|
+
for ( __size_ = 0; __size_ < sz; ++__size_, ++__data, ++src )
|
260
|
+
::new (__data) value_type (*src);
|
261
|
+
}
|
262
|
+
|
263
|
+
template <class _Tp>
|
264
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
265
|
+
dynarray<_Tp>::~dynarray()
|
266
|
+
{
|
267
|
+
value_type *__data = data () + __size_;
|
268
|
+
for ( size_t i = 0; i < __size_; ++i )
|
269
|
+
(--__data)->value_type::~value_type();
|
270
|
+
__deallocate ( __base_ );
|
271
|
+
}
|
272
|
+
|
273
|
+
template <class _Tp>
|
274
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
275
|
+
typename dynarray<_Tp>::reference
|
276
|
+
dynarray<_Tp>::at(size_type __n)
|
277
|
+
{
|
278
|
+
if (__n >= __size_)
|
279
|
+
{
|
280
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
281
|
+
throw out_of_range("dynarray::at");
|
282
|
+
#else
|
283
|
+
assert(!"dynarray::at out_of_range");
|
284
|
+
#endif
|
285
|
+
}
|
286
|
+
return data()[__n];
|
287
|
+
}
|
288
|
+
|
289
|
+
template <class _Tp>
|
290
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
291
|
+
typename dynarray<_Tp>::const_reference
|
292
|
+
dynarray<_Tp>::at(size_type __n) const
|
293
|
+
{
|
294
|
+
if (__n >= __size_)
|
295
|
+
{
|
296
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
297
|
+
throw out_of_range("dynarray::at");
|
298
|
+
#else
|
299
|
+
assert(!"dynarray::at out_of_range");
|
300
|
+
#endif
|
301
|
+
}
|
302
|
+
return data()[__n];
|
303
|
+
}
|
304
|
+
|
305
|
+
template <class _Tp, class _Alloc>
|
306
|
+
struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<dynarray<_Tp>, _Alloc> : true_type {};
|
307
|
+
|
308
|
+
_LIBCPP_END_NAMESPACE_STD
|
309
|
+
|
310
|
+
#endif // if _LIBCPP_STD_VER > 11
|
311
|
+
#endif // _LIBCPP_DYNARRAY
|
@@ -118,8 +118,8 @@ _LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
|
|
118
118
|
|
119
119
|
class _LIBCPP_TYPE_VIS exception_ptr;
|
120
120
|
|
121
|
-
exception_ptr current_exception() _NOEXCEPT;
|
122
|
-
_LIBCPP_NORETURN void rethrow_exception(exception_ptr);
|
121
|
+
_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
|
122
|
+
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
|
123
123
|
|
124
124
|
class _LIBCPP_TYPE_VIS exception_ptr
|
125
125
|
{
|
@@ -142,8 +142,8 @@ public:
|
|
142
142
|
bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
|
143
143
|
{return !(__x == __y);}
|
144
144
|
|
145
|
-
friend exception_ptr current_exception() _NOEXCEPT;
|
146
|
-
friend void rethrow_exception(exception_ptr);
|
145
|
+
friend _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
|
146
|
+
friend _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
|
147
147
|
};
|
148
148
|
|
149
149
|
template<class _Ep>
|
@@ -19,10 +19,10 @@
|
|
19
19
|
namespace __gnu_cxx {
|
20
20
|
using namespace std;
|
21
21
|
|
22
|
-
template <typename T> struct
|
22
|
+
template <typename T> struct _LIBCPP_TYPE_VIS_ONLY hash : public std::hash<T>
|
23
23
|
{ };
|
24
24
|
|
25
|
-
template <> struct
|
25
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
|
26
26
|
: public unary_function<const char*, size_t>
|
27
27
|
{
|
28
28
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -32,7 +32,7 @@ template <> struct _LIBCPP_TYPE_VIS hash<const char*>
|
|
32
32
|
}
|
33
33
|
};
|
34
34
|
|
35
|
-
template <> struct
|
35
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char *>
|
36
36
|
: public unary_function<char*, size_t>
|
37
37
|
{
|
38
38
|
_LIBCPP_INLINE_VISIBILITY
|