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
@@ -28,6 +28,7 @@ namespace std
|
|
28
28
|
|
29
29
|
// Primary classification traits:
|
30
30
|
template <class T> struct is_void;
|
31
|
+
template <class T> struct is_null_pointer; // C++14
|
31
32
|
template <class T> struct is_integral;
|
32
33
|
template <class T> struct is_floating_point;
|
33
34
|
template <class T> struct is_array;
|
@@ -208,16 +209,16 @@ namespace std
|
|
208
209
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
209
210
|
|
210
211
|
template <bool _Bp, class _If, class _Then>
|
211
|
-
struct
|
212
|
+
struct _LIBCPP_TYPE_VIS_ONLY conditional {typedef _If type;};
|
212
213
|
template <class _If, class _Then>
|
213
|
-
struct
|
214
|
+
struct _LIBCPP_TYPE_VIS_ONLY conditional<false, _If, _Then> {typedef _Then type;};
|
214
215
|
|
215
216
|
#if _LIBCPP_STD_VER > 11
|
216
217
|
template <bool _Bp, class _If, class _Then> using conditional_t = typename conditional<_Bp, _If, _Then>::type;
|
217
218
|
#endif
|
218
219
|
|
219
|
-
template <bool, class _Tp = void> struct
|
220
|
-
template <class _Tp> struct
|
220
|
+
template <bool, class _Tp = void> struct _LIBCPP_TYPE_VIS_ONLY enable_if {};
|
221
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY enable_if<true, _Tp> {typedef _Tp type;};
|
221
222
|
|
222
223
|
#if _LIBCPP_STD_VER > 11
|
223
224
|
template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
|
@@ -229,7 +230,7 @@ struct __two {char __lx[2];};
|
|
229
230
|
// helper class:
|
230
231
|
|
231
232
|
template <class _Tp, _Tp __v>
|
232
|
-
struct
|
233
|
+
struct _LIBCPP_TYPE_VIS_ONLY integral_constant
|
233
234
|
{
|
234
235
|
static _LIBCPP_CONSTEXPR const _Tp value = __v;
|
235
236
|
typedef _Tp value_type;
|
@@ -250,33 +251,33 @@ typedef integral_constant<bool, false> false_type;
|
|
250
251
|
|
251
252
|
// is_const
|
252
253
|
|
253
|
-
template <class _Tp> struct
|
254
|
-
template <class _Tp> struct
|
254
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const : public false_type {};
|
255
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const<_Tp const> : public true_type {};
|
255
256
|
|
256
257
|
// is_volatile
|
257
258
|
|
258
|
-
template <class _Tp> struct
|
259
|
-
template <class _Tp> struct
|
259
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile : public false_type {};
|
260
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile<_Tp volatile> : public true_type {};
|
260
261
|
|
261
262
|
// remove_const
|
262
263
|
|
263
|
-
template <class _Tp> struct
|
264
|
-
template <class _Tp> struct
|
264
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const {typedef _Tp type;};
|
265
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const<const _Tp> {typedef _Tp type;};
|
265
266
|
#if _LIBCPP_STD_VER > 11
|
266
267
|
template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type;
|
267
268
|
#endif
|
268
269
|
|
269
270
|
// remove_volatile
|
270
271
|
|
271
|
-
template <class _Tp> struct
|
272
|
-
template <class _Tp> struct
|
272
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile {typedef _Tp type;};
|
273
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile<volatile _Tp> {typedef _Tp type;};
|
273
274
|
#if _LIBCPP_STD_VER > 11
|
274
275
|
template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type;
|
275
276
|
#endif
|
276
277
|
|
277
278
|
// remove_cv
|
278
279
|
|
279
|
-
template <class _Tp> struct
|
280
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_cv
|
280
281
|
{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
|
281
282
|
#if _LIBCPP_STD_VER > 11
|
282
283
|
template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
|
@@ -287,7 +288,7 @@ template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
|
|
287
288
|
template <class _Tp> struct __is_void : public false_type {};
|
288
289
|
template <> struct __is_void<void> : public true_type {};
|
289
290
|
|
290
|
-
template <class _Tp> struct
|
291
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void
|
291
292
|
: public __is_void<typename remove_cv<_Tp>::type> {};
|
292
293
|
|
293
294
|
// __is_nullptr_t
|
@@ -295,9 +296,14 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_void
|
|
295
296
|
template <class _Tp> struct ____is_nullptr_t : public false_type {};
|
296
297
|
template <> struct ____is_nullptr_t<nullptr_t> : public true_type {};
|
297
298
|
|
298
|
-
template <class _Tp> struct
|
299
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY __is_nullptr_t
|
299
300
|
: public ____is_nullptr_t<typename remove_cv<_Tp>::type> {};
|
300
301
|
|
302
|
+
#if _LIBCPP_STD_VER > 11
|
303
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer
|
304
|
+
: public ____is_nullptr_t<typename remove_cv<_Tp>::type> {};
|
305
|
+
#endif
|
306
|
+
|
301
307
|
// is_integral
|
302
308
|
|
303
309
|
template <class _Tp> struct __is_integral : public false_type {};
|
@@ -319,7 +325,7 @@ template <> struct __is_integral<unsigned long> : public true_type
|
|
319
325
|
template <> struct __is_integral<long long> : public true_type {};
|
320
326
|
template <> struct __is_integral<unsigned long long> : public true_type {};
|
321
327
|
|
322
|
-
template <class _Tp> struct
|
328
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_integral
|
323
329
|
: public __is_integral<typename remove_cv<_Tp>::type> {};
|
324
330
|
|
325
331
|
// is_floating_point
|
@@ -329,16 +335,16 @@ template <> struct __is_floating_point<float> : public true_type
|
|
329
335
|
template <> struct __is_floating_point<double> : public true_type {};
|
330
336
|
template <> struct __is_floating_point<long double> : public true_type {};
|
331
337
|
|
332
|
-
template <class _Tp> struct
|
338
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_floating_point
|
333
339
|
: public __is_floating_point<typename remove_cv<_Tp>::type> {};
|
334
340
|
|
335
341
|
// is_array
|
336
342
|
|
337
|
-
template <class _Tp> struct
|
343
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array
|
338
344
|
: public false_type {};
|
339
|
-
template <class _Tp> struct
|
345
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[]>
|
340
346
|
: public true_type {};
|
341
|
-
template <class _Tp, size_t _Np> struct
|
347
|
+
template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[_Np]>
|
342
348
|
: public true_type {};
|
343
349
|
|
344
350
|
// is_pointer
|
@@ -346,23 +352,23 @@ template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS is_array<_Tp[_Np]>
|
|
346
352
|
template <class _Tp> struct __is_pointer : public false_type {};
|
347
353
|
template <class _Tp> struct __is_pointer<_Tp*> : public true_type {};
|
348
354
|
|
349
|
-
template <class _Tp> struct
|
355
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pointer
|
350
356
|
: public __is_pointer<typename remove_cv<_Tp>::type> {};
|
351
357
|
|
352
358
|
// is_reference
|
353
359
|
|
354
|
-
template <class _Tp> struct
|
355
|
-
template <class _Tp> struct
|
360
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference : public false_type {};
|
361
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference<_Tp&> : public true_type {};
|
356
362
|
|
357
|
-
template <class _Tp> struct
|
363
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference : public false_type {};
|
358
364
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
359
|
-
template <class _Tp> struct
|
365
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference<_Tp&&> : public true_type {};
|
360
366
|
#endif
|
361
367
|
|
362
|
-
template <class _Tp> struct
|
363
|
-
template <class _Tp> struct
|
368
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference : public false_type {};
|
369
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&> : public true_type {};
|
364
370
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
365
|
-
template <class _Tp> struct
|
371
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&&> : public true_type {};
|
366
372
|
#endif
|
367
373
|
|
368
374
|
#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
@@ -373,13 +379,13 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_reference<_Tp&&> : public true_t
|
|
373
379
|
|
374
380
|
#if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
375
381
|
|
376
|
-
template <class _Tp> struct
|
382
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
|
377
383
|
: public integral_constant<bool, __is_union(_Tp)> {};
|
378
384
|
|
379
385
|
#else
|
380
386
|
|
381
387
|
template <class _Tp> struct __libcpp_union : public false_type {};
|
382
|
-
template <class _Tp> struct
|
388
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
|
383
389
|
: public __libcpp_union<typename remove_cv<_Tp>::type> {};
|
384
390
|
|
385
391
|
#endif
|
@@ -388,7 +394,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_union
|
|
388
394
|
|
389
395
|
#if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
390
396
|
|
391
|
-
template <class _Tp> struct
|
397
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
|
392
398
|
: public integral_constant<bool, __is_class(_Tp)> {};
|
393
399
|
|
394
400
|
#else
|
@@ -399,15 +405,15 @@ template <class _Tp> char __test(int _Tp::*);
|
|
399
405
|
template <class _Tp> __two __test(...);
|
400
406
|
}
|
401
407
|
|
402
|
-
template <class _Tp> struct
|
408
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
|
403
409
|
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
|
404
410
|
|
405
411
|
#endif
|
406
412
|
|
407
413
|
// is_same
|
408
414
|
|
409
|
-
template <class _Tp, class _Up> struct
|
410
|
-
template <class _Tp> struct
|
415
|
+
template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS_ONLY is_same : public false_type {};
|
416
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_same<_Tp, _Tp> : public true_type {};
|
411
417
|
|
412
418
|
// is_function
|
413
419
|
|
@@ -422,13 +428,13 @@ template <class _Tp, bool = is_class<_Tp>::value ||
|
|
422
428
|
is_union<_Tp>::value ||
|
423
429
|
is_void<_Tp>::value ||
|
424
430
|
is_reference<_Tp>::value ||
|
425
|
-
|
431
|
+
__is_nullptr_t<_Tp>::value >
|
426
432
|
struct __is_function
|
427
433
|
: public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__is_function_imp::__source<_Tp>())) == 1>
|
428
434
|
{};
|
429
435
|
template <class _Tp> struct __is_function<_Tp, true> : public false_type {};
|
430
436
|
|
431
|
-
template <class _Tp> struct
|
437
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_function
|
432
438
|
: public __is_function<_Tp> {};
|
433
439
|
|
434
440
|
// is_member_function_pointer
|
@@ -436,7 +442,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_function
|
|
436
442
|
template <class _Tp> struct __is_member_function_pointer : public false_type {};
|
437
443
|
template <class _Tp, class _Up> struct __is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
|
438
444
|
|
439
|
-
template <class _Tp> struct
|
445
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_function_pointer
|
440
446
|
: public __is_member_function_pointer<typename remove_cv<_Tp>::type> {};
|
441
447
|
|
442
448
|
// is_member_pointer
|
@@ -444,12 +450,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_function_pointer
|
|
444
450
|
template <class _Tp> struct __is_member_pointer : public false_type {};
|
445
451
|
template <class _Tp, class _Up> struct __is_member_pointer<_Tp _Up::*> : public true_type {};
|
446
452
|
|
447
|
-
template <class _Tp> struct
|
453
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_pointer
|
448
454
|
: public __is_member_pointer<typename remove_cv<_Tp>::type> {};
|
449
455
|
|
450
456
|
// is_member_object_pointer
|
451
457
|
|
452
|
-
template <class _Tp> struct
|
458
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_object_pointer
|
453
459
|
: public integral_constant<bool, is_member_pointer<_Tp>::value &&
|
454
460
|
!is_member_function_pointer<_Tp>::value> {};
|
455
461
|
|
@@ -457,12 +463,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_member_object_pointer
|
|
457
463
|
|
458
464
|
#if __has_feature(is_enum) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
459
465
|
|
460
|
-
template <class _Tp> struct
|
466
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
|
461
467
|
: public integral_constant<bool, __is_enum(_Tp)> {};
|
462
468
|
|
463
469
|
#else
|
464
470
|
|
465
|
-
template <class _Tp> struct
|
471
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
|
466
472
|
: public integral_constant<bool, !is_void<_Tp>::value &&
|
467
473
|
!is_integral<_Tp>::value &&
|
468
474
|
!is_floating_point<_Tp>::value &&
|
@@ -478,31 +484,31 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_enum
|
|
478
484
|
|
479
485
|
// is_arithmetic
|
480
486
|
|
481
|
-
template <class _Tp> struct
|
487
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_arithmetic
|
482
488
|
: public integral_constant<bool, is_integral<_Tp>::value ||
|
483
489
|
is_floating_point<_Tp>::value> {};
|
484
490
|
|
485
491
|
// is_fundamental
|
486
492
|
|
487
|
-
template <class _Tp> struct
|
493
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_fundamental
|
488
494
|
: public integral_constant<bool, is_void<_Tp>::value ||
|
489
495
|
__is_nullptr_t<_Tp>::value ||
|
490
496
|
is_arithmetic<_Tp>::value> {};
|
491
497
|
|
492
498
|
// is_scalar
|
493
499
|
|
494
|
-
template <class _Tp> struct
|
500
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_scalar
|
495
501
|
: public integral_constant<bool, is_arithmetic<_Tp>::value ||
|
496
502
|
is_member_pointer<_Tp>::value ||
|
497
503
|
is_pointer<_Tp>::value ||
|
498
504
|
__is_nullptr_t<_Tp>::value ||
|
499
505
|
is_enum<_Tp>::value > {};
|
500
506
|
|
501
|
-
template <> struct
|
507
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY is_scalar<nullptr_t> : public true_type {};
|
502
508
|
|
503
509
|
// is_object
|
504
510
|
|
505
|
-
template <class _Tp> struct
|
511
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_object
|
506
512
|
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
507
513
|
is_array<_Tp>::value ||
|
508
514
|
is_union<_Tp>::value ||
|
@@ -510,7 +516,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_object
|
|
510
516
|
|
511
517
|
// is_compound
|
512
518
|
|
513
|
-
template <class _Tp> struct
|
519
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_compound
|
514
520
|
: public integral_constant<bool, !is_fundamental<_Tp>::value> {};
|
515
521
|
|
516
522
|
// add_const
|
@@ -523,7 +529,7 @@ struct __add_const {typedef _Tp type;};
|
|
523
529
|
template <class _Tp>
|
524
530
|
struct __add_const<_Tp, false> {typedef const _Tp type;};
|
525
531
|
|
526
|
-
template <class _Tp> struct
|
532
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_const
|
527
533
|
{typedef typename __add_const<_Tp>::type type;};
|
528
534
|
|
529
535
|
#if _LIBCPP_STD_VER > 11
|
@@ -540,7 +546,7 @@ struct __add_volatile {typedef _Tp type;};
|
|
540
546
|
template <class _Tp>
|
541
547
|
struct __add_volatile<_Tp, false> {typedef volatile _Tp type;};
|
542
548
|
|
543
|
-
template <class _Tp> struct
|
549
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_volatile
|
544
550
|
{typedef typename __add_volatile<_Tp>::type type;};
|
545
551
|
|
546
552
|
#if _LIBCPP_STD_VER > 11
|
@@ -549,7 +555,7 @@ template <class _Tp> using add_volatile_t = typename add_volatile<_Tp>::type;
|
|
549
555
|
|
550
556
|
// add_cv
|
551
557
|
|
552
|
-
template <class _Tp> struct
|
558
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_cv
|
553
559
|
{typedef typename add_const<typename add_volatile<_Tp>::type>::type type;};
|
554
560
|
|
555
561
|
#if _LIBCPP_STD_VER > 11
|
@@ -558,10 +564,10 @@ template <class _Tp> using add_cv_t = typename add_cv<_Tp>::type;
|
|
558
564
|
|
559
565
|
// remove_reference
|
560
566
|
|
561
|
-
template <class _Tp> struct
|
562
|
-
template <class _Tp> struct
|
567
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference {typedef _Tp type;};
|
568
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&> {typedef _Tp type;};
|
563
569
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
564
|
-
template <class _Tp> struct
|
570
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&&> {typedef _Tp type;};
|
565
571
|
#endif
|
566
572
|
|
567
573
|
#if _LIBCPP_STD_VER > 11
|
@@ -570,12 +576,12 @@ template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::
|
|
570
576
|
|
571
577
|
// add_lvalue_reference
|
572
578
|
|
573
|
-
template <class _Tp> struct
|
574
|
-
template <class _Tp> struct
|
575
|
-
template <> struct
|
576
|
-
template <> struct
|
577
|
-
template <> struct
|
578
|
-
template <> struct
|
579
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference {typedef _Tp& type;};
|
580
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<_Tp&> {typedef _Tp& type;}; // for older compiler
|
581
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<void> {typedef void type;};
|
582
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<const void> {typedef const void type;};
|
583
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<volatile void> {typedef volatile void type;};
|
584
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference<const volatile void> {typedef const volatile void type;};
|
579
585
|
|
580
586
|
#if _LIBCPP_STD_VER > 11
|
581
587
|
template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type;
|
@@ -583,11 +589,11 @@ template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_referenc
|
|
583
589
|
|
584
590
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
585
591
|
|
586
|
-
template <class _Tp> struct
|
587
|
-
template <> struct
|
588
|
-
template <> struct
|
589
|
-
template <> struct
|
590
|
-
template <> struct
|
592
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference {typedef _Tp&& type;};
|
593
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<void> {typedef void type;};
|
594
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<const void> {typedef const void type;};
|
595
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<volatile void> {typedef volatile void type;};
|
596
|
+
template <> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference<const volatile void> {typedef const volatile void type;};
|
591
597
|
|
592
598
|
#if _LIBCPP_STD_VER > 11
|
593
599
|
template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
|
@@ -616,11 +622,11 @@ struct __any
|
|
616
622
|
|
617
623
|
// remove_pointer
|
618
624
|
|
619
|
-
template <class _Tp> struct
|
620
|
-
template <class _Tp> struct
|
621
|
-
template <class _Tp> struct
|
622
|
-
template <class _Tp> struct
|
623
|
-
template <class _Tp> struct
|
625
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer {typedef _Tp type;};
|
626
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp*> {typedef _Tp type;};
|
627
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const> {typedef _Tp type;};
|
628
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* volatile> {typedef _Tp type;};
|
629
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const volatile> {typedef _Tp type;};
|
624
630
|
|
625
631
|
#if _LIBCPP_STD_VER > 11
|
626
632
|
template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type;
|
@@ -628,7 +634,7 @@ template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type
|
|
628
634
|
|
629
635
|
// add_pointer
|
630
636
|
|
631
|
-
template <class _Tp> struct
|
637
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_pointer
|
632
638
|
{typedef typename remove_reference<_Tp>::type* type;};
|
633
639
|
|
634
640
|
#if _LIBCPP_STD_VER > 11
|
@@ -648,7 +654,7 @@ struct __is_signed : public ___is_signed<_Tp> {};
|
|
648
654
|
|
649
655
|
template <class _Tp> struct __is_signed<_Tp, false> : public false_type {};
|
650
656
|
|
651
|
-
template <class _Tp> struct
|
657
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_signed : public __is_signed<_Tp> {};
|
652
658
|
|
653
659
|
// is_unsigned
|
654
660
|
|
@@ -663,37 +669,37 @@ struct __is_unsigned : public ___is_unsigned<_Tp> {};
|
|
663
669
|
|
664
670
|
template <class _Tp> struct __is_unsigned<_Tp, false> : public false_type {};
|
665
671
|
|
666
|
-
template <class _Tp> struct
|
672
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_unsigned : public __is_unsigned<_Tp> {};
|
667
673
|
|
668
674
|
// rank
|
669
675
|
|
670
|
-
template <class _Tp> struct
|
676
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank
|
671
677
|
: public integral_constant<size_t, 0> {};
|
672
|
-
template <class _Tp> struct
|
678
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[]>
|
673
679
|
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
|
674
|
-
template <class _Tp, size_t _Np> struct
|
680
|
+
template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[_Np]>
|
675
681
|
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
|
676
682
|
|
677
683
|
// extent
|
678
684
|
|
679
|
-
template <class _Tp, unsigned _Ip = 0> struct
|
685
|
+
template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TYPE_VIS_ONLY extent
|
680
686
|
: public integral_constant<size_t, 0> {};
|
681
|
-
template <class _Tp> struct
|
687
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], 0>
|
682
688
|
: public integral_constant<size_t, 0> {};
|
683
|
-
template <class _Tp, unsigned _Ip> struct
|
689
|
+
template <class _Tp, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], _Ip>
|
684
690
|
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
|
685
|
-
template <class _Tp, size_t _Np> struct
|
691
|
+
template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], 0>
|
686
692
|
: public integral_constant<size_t, _Np> {};
|
687
|
-
template <class _Tp, size_t _Np, unsigned _Ip> struct
|
693
|
+
template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], _Ip>
|
688
694
|
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
|
689
695
|
|
690
696
|
// remove_extent
|
691
697
|
|
692
|
-
template <class _Tp> struct
|
698
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent
|
693
699
|
{typedef _Tp type;};
|
694
|
-
template <class _Tp> struct
|
700
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[]>
|
695
701
|
{typedef _Tp type;};
|
696
|
-
template <class _Tp, size_t _Np> struct
|
702
|
+
template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[_Np]>
|
697
703
|
{typedef _Tp type;};
|
698
704
|
|
699
705
|
#if _LIBCPP_STD_VER > 11
|
@@ -702,17 +708,42 @@ template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type;
|
|
702
708
|
|
703
709
|
// remove_all_extents
|
704
710
|
|
705
|
-
template <class _Tp> struct
|
711
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents
|
706
712
|
{typedef _Tp type;};
|
707
|
-
template <class _Tp> struct
|
713
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[]>
|
708
714
|
{typedef typename remove_all_extents<_Tp>::type type;};
|
709
|
-
template <class _Tp, size_t _Np> struct
|
715
|
+
template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[_Np]>
|
710
716
|
{typedef typename remove_all_extents<_Tp>::type type;};
|
711
717
|
|
712
718
|
#if _LIBCPP_STD_VER > 11
|
713
719
|
template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
|
714
720
|
#endif
|
715
721
|
|
722
|
+
// decay
|
723
|
+
|
724
|
+
template <class _Tp>
|
725
|
+
struct _LIBCPP_TYPE_VIS_ONLY decay
|
726
|
+
{
|
727
|
+
private:
|
728
|
+
typedef typename remove_reference<_Tp>::type _Up;
|
729
|
+
public:
|
730
|
+
typedef typename conditional
|
731
|
+
<
|
732
|
+
is_array<_Up>::value,
|
733
|
+
typename remove_extent<_Up>::type*,
|
734
|
+
typename conditional
|
735
|
+
<
|
736
|
+
is_function<_Up>::value,
|
737
|
+
typename add_pointer<_Up>::type,
|
738
|
+
typename remove_cv<_Up>::type
|
739
|
+
>::type
|
740
|
+
>::type type;
|
741
|
+
};
|
742
|
+
|
743
|
+
#if _LIBCPP_STD_VER > 11
|
744
|
+
template <class _Tp> using decay_t = typename decay<_Tp>::type;
|
745
|
+
#endif
|
746
|
+
|
716
747
|
// is_abstract
|
717
748
|
|
718
749
|
namespace __is_abstract_imp
|
@@ -726,14 +757,14 @@ struct __libcpp_abstract : public integral_constant<bool, sizeof(__is_abstract_i
|
|
726
757
|
|
727
758
|
template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {};
|
728
759
|
|
729
|
-
template <class _Tp> struct
|
760
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_abstract : public __libcpp_abstract<_Tp> {};
|
730
761
|
|
731
762
|
// is_base_of
|
732
763
|
|
733
764
|
#ifdef _LIBCPP_HAS_IS_BASE_OF
|
734
765
|
|
735
766
|
template <class _Bp, class _Dp>
|
736
|
-
struct
|
767
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_base_of
|
737
768
|
: public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
|
738
769
|
|
739
770
|
#else // __has_feature(is_base_of)
|
@@ -757,7 +788,7 @@ template <class _Bp, class _Dp> __two __test(...);
|
|
757
788
|
}
|
758
789
|
|
759
790
|
template <class _Bp, class _Dp>
|
760
|
-
struct
|
791
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_base_of
|
761
792
|
: public integral_constant<bool, is_class<_Bp>::value &&
|
762
793
|
sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
|
763
794
|
|
@@ -767,7 +798,7 @@ struct _LIBCPP_TYPE_VIS is_base_of
|
|
767
798
|
|
768
799
|
#if __has_feature(is_convertible_to)
|
769
800
|
|
770
|
-
template <class _T1, class _T2> struct
|
801
|
+
template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
|
771
802
|
: public integral_constant<bool, __is_convertible_to(_T1, _T2) &&
|
772
803
|
!is_abstract<_T2>::value> {};
|
773
804
|
|
@@ -873,7 +904,7 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public
|
|
873
904
|
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
|
874
905
|
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
|
875
906
|
|
876
|
-
template <class _T1, class _T2> struct
|
907
|
+
template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
|
877
908
|
: public __is_convertible<_T1, _T2>
|
878
909
|
{
|
879
910
|
static const size_t __complete_check1 = __is_convertible_check<_T1>::__v;
|
@@ -887,7 +918,7 @@ template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
|
|
887
918
|
#if __has_feature(is_empty)
|
888
919
|
|
889
920
|
template <class _Tp>
|
890
|
-
struct
|
921
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_empty
|
891
922
|
: public integral_constant<bool, __is_empty(_Tp)> {};
|
892
923
|
|
893
924
|
#else // __has_feature(is_empty)
|
@@ -909,7 +940,7 @@ struct __libcpp_empty : public integral_constant<bool, sizeof(__is_empty1<_Tp>)
|
|
909
940
|
|
910
941
|
template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {};
|
911
942
|
|
912
|
-
template <class _Tp> struct
|
943
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_empty : public __libcpp_empty<_Tp> {};
|
913
944
|
|
914
945
|
#endif // __has_feature(is_empty)
|
915
946
|
|
@@ -918,7 +949,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_empty : public __libcpp_empty<_T
|
|
918
949
|
#if __has_feature(is_polymorphic)
|
919
950
|
|
920
951
|
template <class _Tp>
|
921
|
-
struct
|
952
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
|
922
953
|
: public integral_constant<bool, __is_polymorphic(_Tp)> {};
|
923
954
|
|
924
955
|
#else
|
@@ -928,7 +959,7 @@ template<typename _Tp> char &__is_polymorphic_impl(
|
|
928
959
|
int>::type);
|
929
960
|
template<typename _Tp> __two &__is_polymorphic_impl(...);
|
930
961
|
|
931
|
-
template <class _Tp> struct
|
962
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
|
932
963
|
: public integral_constant<bool, sizeof(__is_polymorphic_impl<_Tp>(0)) == 1> {};
|
933
964
|
|
934
965
|
#endif // __has_feature(is_polymorphic)
|
@@ -937,19 +968,19 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_polymorphic
|
|
937
968
|
|
938
969
|
#if __has_feature(has_virtual_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
939
970
|
|
940
|
-
template <class _Tp> struct
|
971
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
|
941
972
|
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
|
942
973
|
|
943
974
|
#else // _LIBCPP_HAS_TYPE_TRAITS
|
944
975
|
|
945
|
-
template <class _Tp> struct
|
976
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
|
946
977
|
: public false_type {};
|
947
978
|
|
948
979
|
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
949
980
|
|
950
981
|
// alignment_of
|
951
982
|
|
952
|
-
template <class _Tp> struct
|
983
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY alignment_of
|
953
984
|
: public integral_constant<size_t, __alignof__(_Tp)> {};
|
954
985
|
|
955
986
|
// aligned_storage
|
@@ -1037,7 +1068,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
|
|
1037
1068
|
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
|
1038
1069
|
|
1039
1070
|
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
|
1040
|
-
struct
|
1071
|
+
struct _LIBCPP_TYPE_VIS_ONLY aligned_storage
|
1041
1072
|
{
|
1042
1073
|
typedef typename __find_pod<__all_types, _Align>::type _Aligner;
|
1043
1074
|
static_assert(!is_void<_Aligner>::value, "");
|
@@ -1055,7 +1086,7 @@ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::valu
|
|
1055
1086
|
|
1056
1087
|
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
|
1057
1088
|
template <size_t _Len>\
|
1058
|
-
struct
|
1089
|
+
struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\
|
1059
1090
|
{\
|
1060
1091
|
struct _ALIGNAS(n) type\
|
1061
1092
|
{\
|
@@ -1274,7 +1305,7 @@ template <> struct __make_signed< signed long long, true> {typedef long long ty
|
|
1274
1305
|
template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
|
1275
1306
|
|
1276
1307
|
template <class _Tp>
|
1277
|
-
struct
|
1308
|
+
struct _LIBCPP_TYPE_VIS_ONLY make_signed
|
1278
1309
|
{
|
1279
1310
|
typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
|
1280
1311
|
};
|
@@ -1303,7 +1334,7 @@ template <> struct __make_unsigned< signed long long, true> {typedef unsigned l
|
|
1303
1334
|
template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
|
1304
1335
|
|
1305
1336
|
template <class _Tp>
|
1306
|
-
struct
|
1337
|
+
struct _LIBCPP_TYPE_VIS_ONLY make_unsigned
|
1307
1338
|
{
|
1308
1339
|
typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
|
1309
1340
|
};
|
@@ -1315,21 +1346,21 @@ template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
|
|
1315
1346
|
#ifdef _LIBCPP_HAS_NO_VARIADICS
|
1316
1347
|
|
1317
1348
|
template <class _Tp, class _Up = void, class V = void>
|
1318
|
-
struct
|
1349
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type
|
1319
1350
|
{
|
1320
1351
|
public:
|
1321
1352
|
typedef typename common_type<typename common_type<_Tp, _Up>::type, V>::type type;
|
1322
1353
|
};
|
1323
1354
|
|
1324
1355
|
template <class _Tp>
|
1325
|
-
struct
|
1356
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, void, void>
|
1326
1357
|
{
|
1327
1358
|
public:
|
1328
1359
|
typedef _Tp type;
|
1329
1360
|
};
|
1330
1361
|
|
1331
1362
|
template <class _Tp, class _Up>
|
1332
|
-
struct
|
1363
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, void>
|
1333
1364
|
{
|
1334
1365
|
private:
|
1335
1366
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
@@ -1348,24 +1379,24 @@ public:
|
|
1348
1379
|
template <class ..._Tp> struct common_type;
|
1349
1380
|
|
1350
1381
|
template <class _Tp>
|
1351
|
-
struct
|
1382
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp>
|
1352
1383
|
{
|
1353
|
-
typedef _Tp type;
|
1384
|
+
typedef typename decay<_Tp>::type type;
|
1354
1385
|
};
|
1355
1386
|
|
1356
1387
|
template <class _Tp, class _Up>
|
1357
|
-
struct
|
1388
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up>
|
1358
1389
|
{
|
1359
1390
|
private:
|
1360
1391
|
static _Tp&& __t();
|
1361
1392
|
static _Up&& __u();
|
1362
1393
|
static bool __f();
|
1363
1394
|
public:
|
1364
|
-
typedef typename
|
1395
|
+
typedef typename decay<decltype(__f() ? __t() : __u())>::type type;
|
1365
1396
|
};
|
1366
1397
|
|
1367
1398
|
template <class _Tp, class _Up, class ..._Vp>
|
1368
|
-
struct
|
1399
|
+
struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, _Vp...>
|
1369
1400
|
{
|
1370
1401
|
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
|
1371
1402
|
};
|
@@ -1378,8 +1409,10 @@ template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type
|
|
1378
1409
|
|
1379
1410
|
// is_assignable
|
1380
1411
|
|
1412
|
+
template<typename, typename T> struct __select_2nd { typedef T type; };
|
1413
|
+
|
1381
1414
|
template <class _Tp, class _Arg>
|
1382
|
-
decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>(), true_type
|
1415
|
+
typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type
|
1383
1416
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1384
1417
|
__is_assignable_test(_Tp&&, _Arg&&);
|
1385
1418
|
#else
|
@@ -1413,13 +1446,13 @@ struct is_assignable
|
|
1413
1446
|
|
1414
1447
|
// is_copy_assignable
|
1415
1448
|
|
1416
|
-
template <class _Tp> struct
|
1449
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_copy_assignable
|
1417
1450
|
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
|
1418
1451
|
const typename add_lvalue_reference<_Tp>::type> {};
|
1419
1452
|
|
1420
1453
|
// is_move_assignable
|
1421
1454
|
|
1422
|
-
template <class _Tp> struct
|
1455
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable
|
1423
1456
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1424
1457
|
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
|
1425
1458
|
const typename add_rvalue_reference<_Tp>::type> {};
|
@@ -1446,7 +1479,8 @@ __is_destructible_test(_Tp&);
|
|
1446
1479
|
false_type
|
1447
1480
|
__is_destructible_test(__any);
|
1448
1481
|
|
1449
|
-
template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value
|
1482
|
+
template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value
|
1483
|
+
|| is_function<_Tp>::value>
|
1450
1484
|
struct __destructible_imp
|
1451
1485
|
: public common_type
|
1452
1486
|
<
|
@@ -1461,6 +1495,10 @@ template <class _Tp>
|
|
1461
1495
|
struct is_destructible
|
1462
1496
|
: public __destructible_imp<_Tp> {};
|
1463
1497
|
|
1498
|
+
template <class _Tp>
|
1499
|
+
struct is_destructible<_Tp[]>
|
1500
|
+
: public false_type {};
|
1501
|
+
|
1464
1502
|
// move
|
1465
1503
|
|
1466
1504
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
@@ -1533,29 +1571,6 @@ public:
|
|
1533
1571
|
|
1534
1572
|
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1535
1573
|
|
1536
|
-
template <class _Tp>
|
1537
|
-
struct _LIBCPP_TYPE_VIS decay
|
1538
|
-
{
|
1539
|
-
private:
|
1540
|
-
typedef typename remove_reference<_Tp>::type _Up;
|
1541
|
-
public:
|
1542
|
-
typedef typename conditional
|
1543
|
-
<
|
1544
|
-
is_array<_Up>::value,
|
1545
|
-
typename remove_extent<_Up>::type*,
|
1546
|
-
typename conditional
|
1547
|
-
<
|
1548
|
-
is_function<_Up>::value,
|
1549
|
-
typename add_pointer<_Up>::type,
|
1550
|
-
typename remove_cv<_Up>::type
|
1551
|
-
>::type
|
1552
|
-
>::type type;
|
1553
|
-
};
|
1554
|
-
|
1555
|
-
#if _LIBCPP_STD_VER > 11
|
1556
|
-
template <class _Tp> using decay_t = typename decay<_Tp>::type;
|
1557
|
-
#endif
|
1558
|
-
|
1559
1574
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1560
1575
|
|
1561
1576
|
template <class _Tp>
|
@@ -1917,7 +1932,7 @@ class __result_of<_Fn(_Tp, _A0, _A1, _A2), false, true> // _Fn must be member p
|
|
1917
1932
|
// result_of
|
1918
1933
|
|
1919
1934
|
template <class _Fn>
|
1920
|
-
class
|
1935
|
+
class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn()>
|
1921
1936
|
: public __result_of<_Fn(),
|
1922
1937
|
is_class<typename remove_reference<_Fn>::type>::value ||
|
1923
1938
|
is_function<typename remove_reference<_Fn>::type>::value,
|
@@ -1927,7 +1942,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn()>
|
|
1927
1942
|
};
|
1928
1943
|
|
1929
1944
|
template <class _Fn, class _A0>
|
1930
|
-
class
|
1945
|
+
class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0)>
|
1931
1946
|
: public __result_of<_Fn(_A0),
|
1932
1947
|
is_class<typename remove_reference<_Fn>::type>::value ||
|
1933
1948
|
is_function<typename remove_reference<_Fn>::type>::value,
|
@@ -1937,7 +1952,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0)>
|
|
1937
1952
|
};
|
1938
1953
|
|
1939
1954
|
template <class _Fn, class _A0, class _A1>
|
1940
|
-
class
|
1955
|
+
class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1)>
|
1941
1956
|
: public __result_of<_Fn(_A0, _A1),
|
1942
1957
|
is_class<typename remove_reference<_Fn>::type>::value ||
|
1943
1958
|
is_function<typename remove_reference<_Fn>::type>::value,
|
@@ -1947,7 +1962,7 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1)>
|
|
1947
1962
|
};
|
1948
1963
|
|
1949
1964
|
template <class _Fn, class _A0, class _A1, class _A2>
|
1950
|
-
class
|
1965
|
+
class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1, _A2)>
|
1951
1966
|
: public __result_of<_Fn(_A0, _A1, _A2),
|
1952
1967
|
is_class<typename remove_reference<_Fn>::type>::value ||
|
1953
1968
|
is_function<typename remove_reference<_Fn>::type>::value,
|
@@ -1964,8 +1979,6 @@ class _LIBCPP_TYPE_VIS result_of<_Fn(_A0, _A1, _A2)>
|
|
1964
1979
|
|
1965
1980
|
// main is_constructible test
|
1966
1981
|
|
1967
|
-
template<typename, typename T> struct __select_2nd { typedef T type; };
|
1968
|
-
|
1969
1982
|
template <class _Tp, class ..._Args>
|
1970
1983
|
typename __select_2nd<decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...))), true_type>::type
|
1971
1984
|
__is_constructible_test(_Tp&&, _Args&& ...);
|
@@ -2052,7 +2065,7 @@ struct __contains_void<_A0, _Args...>
|
|
2052
2065
|
// is_constructible entry point
|
2053
2066
|
|
2054
2067
|
template <class _Tp, class... _Args>
|
2055
|
-
struct
|
2068
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_constructible
|
2056
2069
|
: public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value
|
2057
2070
|
|| is_abstract<_Tp>::value,
|
2058
2071
|
_Tp, _Args...>
|
@@ -2200,7 +2213,7 @@ struct __nat {};
|
|
2200
2213
|
|
2201
2214
|
template <class _Tp, class _A0 = __is_construct::__nat,
|
2202
2215
|
class _A1 = __is_construct::__nat>
|
2203
|
-
struct
|
2216
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_constructible
|
2204
2217
|
: public __is_constructible2_void_check<is_void<_Tp>::value
|
2205
2218
|
|| is_abstract<_Tp>::value
|
2206
2219
|
|| is_function<_Tp>::value
|
@@ -2210,7 +2223,7 @@ struct _LIBCPP_TYPE_VIS is_constructible
|
|
2210
2223
|
{};
|
2211
2224
|
|
2212
2225
|
template <class _Tp>
|
2213
|
-
struct
|
2226
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat>
|
2214
2227
|
: public __is_constructible0_void_check<is_void<_Tp>::value
|
2215
2228
|
|| is_abstract<_Tp>::value
|
2216
2229
|
|| is_function<_Tp>::value,
|
@@ -2218,7 +2231,7 @@ struct _LIBCPP_TYPE_VIS is_constructible<_Tp, __is_construct::__nat, __is_constr
|
|
2218
2231
|
{};
|
2219
2232
|
|
2220
2233
|
template <class _Tp, class _A0>
|
2221
|
-
struct
|
2234
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, _A0, __is_construct::__nat>
|
2222
2235
|
: public __is_constructible1_void_check<is_void<_Tp>::value
|
2223
2236
|
|| is_abstract<_Tp>::value
|
2224
2237
|
|| is_function<_Tp>::value
|
@@ -2266,21 +2279,21 @@ struct __is_constructible2_imp<false, _Ap[], _A0, _A1>
|
|
2266
2279
|
// is_default_constructible
|
2267
2280
|
|
2268
2281
|
template <class _Tp>
|
2269
|
-
struct
|
2282
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_default_constructible
|
2270
2283
|
: public is_constructible<_Tp>
|
2271
2284
|
{};
|
2272
2285
|
|
2273
2286
|
// is_copy_constructible
|
2274
2287
|
|
2275
2288
|
template <class _Tp>
|
2276
|
-
struct
|
2289
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_copy_constructible
|
2277
2290
|
: public is_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
|
2278
2291
|
{};
|
2279
2292
|
|
2280
2293
|
// is_move_constructible
|
2281
2294
|
|
2282
2295
|
template <class _Tp>
|
2283
|
-
struct
|
2296
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_move_constructible
|
2284
2297
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2285
2298
|
: public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
|
2286
2299
|
#else
|
@@ -2295,7 +2308,7 @@ struct _LIBCPP_TYPE_VIS is_move_constructible
|
|
2295
2308
|
#if __has_feature(is_trivially_constructible)
|
2296
2309
|
|
2297
2310
|
template <class _Tp, class... _Args>
|
2298
|
-
struct
|
2311
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
|
2299
2312
|
: integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)>
|
2300
2313
|
{
|
2301
2314
|
};
|
@@ -2303,13 +2316,13 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible
|
|
2303
2316
|
#else // !__has_feature(is_trivially_constructible)
|
2304
2317
|
|
2305
2318
|
template <class _Tp, class... _Args>
|
2306
|
-
struct
|
2319
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
|
2307
2320
|
: false_type
|
2308
2321
|
{
|
2309
2322
|
};
|
2310
2323
|
|
2311
2324
|
template <class _Tp>
|
2312
|
-
struct
|
2325
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
|
2313
2326
|
#if __has_feature(has_trivial_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2314
2327
|
: integral_constant<bool, __has_trivial_constructor(_Tp)>
|
2315
2328
|
#else
|
@@ -2320,22 +2333,22 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp>
|
|
2320
2333
|
|
2321
2334
|
template <class _Tp>
|
2322
2335
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2323
|
-
struct
|
2336
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&&>
|
2324
2337
|
#else
|
2325
|
-
struct
|
2338
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp>
|
2326
2339
|
#endif
|
2327
2340
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2328
2341
|
{
|
2329
2342
|
};
|
2330
2343
|
|
2331
2344
|
template <class _Tp>
|
2332
|
-
struct
|
2345
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&>
|
2333
2346
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2334
2347
|
{
|
2335
2348
|
};
|
2336
2349
|
|
2337
2350
|
template <class _Tp>
|
2338
|
-
struct
|
2351
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&>
|
2339
2352
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2340
2353
|
{
|
2341
2354
|
};
|
@@ -2346,7 +2359,7 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&>
|
|
2346
2359
|
|
2347
2360
|
template <class _Tp, class _A0 = __is_construct::__nat,
|
2348
2361
|
class _A1 = __is_construct::__nat>
|
2349
|
-
struct
|
2362
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
|
2350
2363
|
: false_type
|
2351
2364
|
{
|
2352
2365
|
};
|
@@ -2354,28 +2367,28 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible
|
|
2354
2367
|
#if __has_feature(is_trivially_constructible)
|
2355
2368
|
|
2356
2369
|
template <class _Tp>
|
2357
|
-
struct
|
2370
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
|
2358
2371
|
__is_construct::__nat>
|
2359
2372
|
: integral_constant<bool, __is_trivially_constructible(_Tp)>
|
2360
2373
|
{
|
2361
2374
|
};
|
2362
2375
|
|
2363
2376
|
template <class _Tp>
|
2364
|
-
struct
|
2377
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
|
2365
2378
|
__is_construct::__nat>
|
2366
2379
|
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp)>
|
2367
2380
|
{
|
2368
2381
|
};
|
2369
2382
|
|
2370
2383
|
template <class _Tp>
|
2371
|
-
struct
|
2384
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
|
2372
2385
|
__is_construct::__nat>
|
2373
2386
|
: integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)>
|
2374
2387
|
{
|
2375
2388
|
};
|
2376
2389
|
|
2377
2390
|
template <class _Tp>
|
2378
|
-
struct
|
2391
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
|
2379
2392
|
__is_construct::__nat>
|
2380
2393
|
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&)>
|
2381
2394
|
{
|
@@ -2384,28 +2397,28 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
|
|
2384
2397
|
#else // !__has_feature(is_trivially_constructible)
|
2385
2398
|
|
2386
2399
|
template <class _Tp>
|
2387
|
-
struct
|
2400
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
|
2388
2401
|
__is_construct::__nat>
|
2389
2402
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2390
2403
|
{
|
2391
2404
|
};
|
2392
2405
|
|
2393
2406
|
template <class _Tp>
|
2394
|
-
struct
|
2407
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
|
2395
2408
|
__is_construct::__nat>
|
2396
2409
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2397
2410
|
{
|
2398
2411
|
};
|
2399
2412
|
|
2400
2413
|
template <class _Tp>
|
2401
|
-
struct
|
2414
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
|
2402
2415
|
__is_construct::__nat>
|
2403
2416
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2404
2417
|
{
|
2405
2418
|
};
|
2406
2419
|
|
2407
2420
|
template <class _Tp>
|
2408
|
-
struct
|
2421
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
|
2409
2422
|
__is_construct::__nat>
|
2410
2423
|
: integral_constant<bool, is_scalar<_Tp>::value>
|
2411
2424
|
{
|
@@ -2417,19 +2430,19 @@ struct _LIBCPP_TYPE_VIS is_trivially_constructible<_Tp, _Tp&,
|
|
2417
2430
|
|
2418
2431
|
// is_trivially_default_constructible
|
2419
2432
|
|
2420
|
-
template <class _Tp> struct
|
2433
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_default_constructible
|
2421
2434
|
: public is_trivially_constructible<_Tp>
|
2422
2435
|
{};
|
2423
2436
|
|
2424
2437
|
// is_trivially_copy_constructible
|
2425
2438
|
|
2426
|
-
template <class _Tp> struct
|
2439
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_constructible
|
2427
2440
|
: public is_trivially_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
|
2428
2441
|
{};
|
2429
2442
|
|
2430
2443
|
// is_trivially_move_constructible
|
2431
2444
|
|
2432
|
-
template <class _Tp> struct
|
2445
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_constructible
|
2433
2446
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2434
2447
|
: public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
|
2435
2448
|
#else
|
@@ -2477,14 +2490,14 @@ struct is_trivially_assignable<_Tp&, _Tp&&>
|
|
2477
2490
|
|
2478
2491
|
// is_trivially_copy_assignable
|
2479
2492
|
|
2480
|
-
template <class _Tp> struct
|
2493
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_assignable
|
2481
2494
|
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
|
2482
2495
|
const typename add_lvalue_reference<_Tp>::type>
|
2483
2496
|
{};
|
2484
2497
|
|
2485
2498
|
// is_trivially_move_assignable
|
2486
2499
|
|
2487
|
-
template <class _Tp> struct
|
2500
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_assignable
|
2488
2501
|
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
|
2489
2502
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2490
2503
|
typename add_rvalue_reference<_Tp>::type>
|
@@ -2497,7 +2510,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_move_assignable
|
|
2497
2510
|
|
2498
2511
|
#if __has_feature(has_trivial_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2499
2512
|
|
2500
|
-
template <class _Tp> struct
|
2513
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
|
2501
2514
|
: public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
|
2502
2515
|
|
2503
2516
|
#else // _LIBCPP_HAS_TYPE_TRAITS
|
@@ -2506,7 +2519,7 @@ template <class _Tp> struct __libcpp_trivial_destructor
|
|
2506
2519
|
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
2507
2520
|
is_reference<_Tp>::value> {};
|
2508
2521
|
|
2509
|
-
template <class _Tp> struct
|
2522
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
|
2510
2523
|
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
|
2511
2524
|
|
2512
2525
|
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
@@ -2532,13 +2545,13 @@ struct __is_nothrow_constructible<false, _Tp, _Args...>
|
|
2532
2545
|
};
|
2533
2546
|
|
2534
2547
|
template <class _Tp, class... _Args>
|
2535
|
-
struct
|
2548
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
|
2536
2549
|
: __is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, _Tp, _Args...>
|
2537
2550
|
{
|
2538
2551
|
};
|
2539
2552
|
|
2540
2553
|
template <class _Tp, size_t _Ns>
|
2541
|
-
struct
|
2554
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]>
|
2542
2555
|
: __is_nothrow_constructible<is_constructible<_Tp>::value, _Tp>
|
2543
2556
|
{
|
2544
2557
|
};
|
@@ -2546,13 +2559,13 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp[_Ns]>
|
|
2546
2559
|
#else // __has_feature(cxx_noexcept)
|
2547
2560
|
|
2548
2561
|
template <class _Tp, class... _Args>
|
2549
|
-
struct
|
2562
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
|
2550
2563
|
: false_type
|
2551
2564
|
{
|
2552
2565
|
};
|
2553
2566
|
|
2554
2567
|
template <class _Tp>
|
2555
|
-
struct
|
2568
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
|
2556
2569
|
#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2557
2570
|
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
|
2558
2571
|
#else
|
@@ -2563,9 +2576,9 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp>
|
|
2563
2576
|
|
2564
2577
|
template <class _Tp>
|
2565
2578
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2566
|
-
struct
|
2579
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&&>
|
2567
2580
|
#else
|
2568
|
-
struct
|
2581
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
|
2569
2582
|
#endif
|
2570
2583
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2571
2584
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
@@ -2576,7 +2589,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp>
|
|
2576
2589
|
};
|
2577
2590
|
|
2578
2591
|
template <class _Tp>
|
2579
|
-
struct
|
2592
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
|
2580
2593
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2581
2594
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
2582
2595
|
#else
|
@@ -2586,7 +2599,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&>
|
|
2586
2599
|
};
|
2587
2600
|
|
2588
2601
|
template <class _Tp>
|
2589
|
-
struct
|
2602
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
|
2590
2603
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2591
2604
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
2592
2605
|
#else
|
@@ -2601,13 +2614,13 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&>
|
|
2601
2614
|
|
2602
2615
|
template <class _Tp, class _A0 = __is_construct::__nat,
|
2603
2616
|
class _A1 = __is_construct::__nat>
|
2604
|
-
struct
|
2617
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
|
2605
2618
|
: false_type
|
2606
2619
|
{
|
2607
2620
|
};
|
2608
2621
|
|
2609
2622
|
template <class _Tp>
|
2610
|
-
struct
|
2623
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat,
|
2611
2624
|
__is_construct::__nat>
|
2612
2625
|
#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2613
2626
|
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
|
@@ -2618,7 +2631,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, __is_construct::__nat,
|
|
2618
2631
|
};
|
2619
2632
|
|
2620
2633
|
template <class _Tp>
|
2621
|
-
struct
|
2634
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
|
2622
2635
|
__is_construct::__nat>
|
2623
2636
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2624
2637
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
@@ -2629,7 +2642,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp,
|
|
2629
2642
|
};
|
2630
2643
|
|
2631
2644
|
template <class _Tp>
|
2632
|
-
struct
|
2645
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
|
2633
2646
|
__is_construct::__nat>
|
2634
2647
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2635
2648
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
@@ -2640,7 +2653,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, const _Tp&,
|
|
2640
2653
|
};
|
2641
2654
|
|
2642
2655
|
template <class _Tp>
|
2643
|
-
struct
|
2656
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&,
|
2644
2657
|
__is_construct::__nat>
|
2645
2658
|
#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2646
2659
|
: integral_constant<bool, __has_nothrow_copy(_Tp)>
|
@@ -2654,19 +2667,19 @@ struct _LIBCPP_TYPE_VIS is_nothrow_constructible<_Tp, _Tp&,
|
|
2654
2667
|
|
2655
2668
|
// is_nothrow_default_constructible
|
2656
2669
|
|
2657
|
-
template <class _Tp> struct
|
2670
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_default_constructible
|
2658
2671
|
: public is_nothrow_constructible<_Tp>
|
2659
2672
|
{};
|
2660
2673
|
|
2661
2674
|
// is_nothrow_copy_constructible
|
2662
2675
|
|
2663
|
-
template <class _Tp> struct
|
2676
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_constructible
|
2664
2677
|
: public is_nothrow_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type>
|
2665
2678
|
{};
|
2666
2679
|
|
2667
2680
|
// is_nothrow_move_constructible
|
2668
2681
|
|
2669
|
-
template <class _Tp> struct
|
2682
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_constructible
|
2670
2683
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2671
2684
|
: public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
|
2672
2685
|
#else
|
@@ -2693,7 +2706,7 @@ struct __is_nothrow_assignable<true, _Tp, _Arg>
|
|
2693
2706
|
};
|
2694
2707
|
|
2695
2708
|
template <class _Tp, class _Arg>
|
2696
|
-
struct
|
2709
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
|
2697
2710
|
: public __is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
|
2698
2711
|
{
|
2699
2712
|
};
|
@@ -2701,11 +2714,11 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable
|
|
2701
2714
|
#else // __has_feature(cxx_noexcept)
|
2702
2715
|
|
2703
2716
|
template <class _Tp, class _Arg>
|
2704
|
-
struct
|
2717
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
|
2705
2718
|
: public false_type {};
|
2706
2719
|
|
2707
2720
|
template <class _Tp>
|
2708
|
-
struct
|
2721
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
|
2709
2722
|
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2710
2723
|
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
|
2711
2724
|
#else
|
@@ -2713,7 +2726,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp>
|
|
2713
2726
|
#endif
|
2714
2727
|
|
2715
2728
|
template <class _Tp>
|
2716
|
-
struct
|
2729
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
|
2717
2730
|
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2718
2731
|
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
|
2719
2732
|
#else
|
@@ -2721,7 +2734,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_assignable<_Tp&, _Tp&>
|
|
2721
2734
|
#endif
|
2722
2735
|
|
2723
2736
|
template <class _Tp>
|
2724
|
-
struct
|
2737
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, const _Tp&>
|
2725
2738
|
#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2726
2739
|
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
|
2727
2740
|
#else
|
@@ -2744,14 +2757,14 @@ struct is_nothrow_assignable<_Tp&, _Tp&&>
|
|
2744
2757
|
|
2745
2758
|
// is_nothrow_copy_assignable
|
2746
2759
|
|
2747
|
-
template <class _Tp> struct
|
2760
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_assignable
|
2748
2761
|
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
|
2749
2762
|
const typename add_lvalue_reference<_Tp>::type>
|
2750
2763
|
{};
|
2751
2764
|
|
2752
2765
|
// is_nothrow_move_assignable
|
2753
2766
|
|
2754
|
-
template <class _Tp> struct
|
2767
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_assignable
|
2755
2768
|
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
|
2756
2769
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2757
2770
|
typename add_rvalue_reference<_Tp>::type>
|
@@ -2779,19 +2792,19 @@ struct __is_nothrow_destructible<true, _Tp>
|
|
2779
2792
|
};
|
2780
2793
|
|
2781
2794
|
template <class _Tp>
|
2782
|
-
struct
|
2795
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
|
2783
2796
|
: public __is_nothrow_destructible<is_destructible<_Tp>::value, _Tp>
|
2784
2797
|
{
|
2785
2798
|
};
|
2786
2799
|
|
2787
2800
|
template <class _Tp, size_t _Ns>
|
2788
|
-
struct
|
2801
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[_Ns]>
|
2789
2802
|
: public is_nothrow_destructible<_Tp>
|
2790
2803
|
{
|
2791
2804
|
};
|
2792
2805
|
|
2793
2806
|
template <class _Tp>
|
2794
|
-
struct
|
2807
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&>
|
2795
2808
|
: public true_type
|
2796
2809
|
{
|
2797
2810
|
};
|
@@ -2799,7 +2812,7 @@ struct _LIBCPP_TYPE_VIS is_nothrow_destructible<_Tp&>
|
|
2799
2812
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2800
2813
|
|
2801
2814
|
template <class _Tp>
|
2802
|
-
struct
|
2815
|
+
struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&&>
|
2803
2816
|
: public true_type
|
2804
2817
|
{
|
2805
2818
|
};
|
@@ -2812,7 +2825,7 @@ template <class _Tp> struct __libcpp_nothrow_destructor
|
|
2812
2825
|
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
2813
2826
|
is_reference<_Tp>::value> {};
|
2814
2827
|
|
2815
|
-
template <class _Tp> struct
|
2828
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
|
2816
2829
|
: public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
|
2817
2830
|
|
2818
2831
|
#endif
|
@@ -2821,12 +2834,12 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_nothrow_destructible
|
|
2821
2834
|
|
2822
2835
|
#if __has_feature(is_pod) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
2823
2836
|
|
2824
|
-
template <class _Tp> struct
|
2837
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
|
2825
2838
|
: public integral_constant<bool, __is_pod(_Tp)> {};
|
2826
2839
|
|
2827
2840
|
#else // _LIBCPP_HAS_TYPE_TRAITS
|
2828
2841
|
|
2829
|
-
template <class _Tp> struct
|
2842
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
|
2830
2843
|
: public integral_constant<bool, is_trivially_default_constructible<_Tp>::value &&
|
2831
2844
|
is_trivially_copy_constructible<_Tp>::value &&
|
2832
2845
|
is_trivially_copy_assignable<_Tp>::value &&
|
@@ -2836,7 +2849,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_pod
|
|
2836
2849
|
|
2837
2850
|
// is_literal_type;
|
2838
2851
|
|
2839
|
-
template <class _Tp> struct
|
2852
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_literal_type
|
2840
2853
|
#if __has_feature(is_literal)
|
2841
2854
|
: public integral_constant<bool, __is_literal(_Tp)>
|
2842
2855
|
#else
|
@@ -2847,7 +2860,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_literal_type
|
|
2847
2860
|
|
2848
2861
|
// is_standard_layout;
|
2849
2862
|
|
2850
|
-
template <class _Tp> struct
|
2863
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_standard_layout
|
2851
2864
|
#if __has_feature(is_standard_layout)
|
2852
2865
|
: public integral_constant<bool, __is_standard_layout(_Tp)>
|
2853
2866
|
#else
|
@@ -2857,7 +2870,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_standard_layout
|
|
2857
2870
|
|
2858
2871
|
// is_trivially_copyable;
|
2859
2872
|
|
2860
|
-
template <class _Tp> struct
|
2873
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copyable
|
2861
2874
|
#if __has_feature(is_trivially_copyable)
|
2862
2875
|
: public integral_constant<bool, __is_trivially_copyable(_Tp)>
|
2863
2876
|
#else
|
@@ -2867,7 +2880,7 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS is_trivially_copyable
|
|
2867
2880
|
|
2868
2881
|
// is_trivial;
|
2869
2882
|
|
2870
|
-
template <class _Tp> struct
|
2883
|
+
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivial
|
2871
2884
|
#if __has_feature(is_trivial)
|
2872
2885
|
: public integral_constant<bool, __is_trivial(_Tp)>
|
2873
2886
|
#else
|
@@ -2924,12 +2937,22 @@ struct __check_complete<_Rp (*)(_Param...)>
|
|
2924
2937
|
{
|
2925
2938
|
};
|
2926
2939
|
|
2940
|
+
template <class ..._Param>
|
2941
|
+
struct __check_complete<void (*)(_Param...)>
|
2942
|
+
{
|
2943
|
+
};
|
2944
|
+
|
2927
2945
|
template <class _Rp, class ..._Param>
|
2928
2946
|
struct __check_complete<_Rp (_Param...)>
|
2929
2947
|
: private __check_complete<_Rp>
|
2930
2948
|
{
|
2931
2949
|
};
|
2932
2950
|
|
2951
|
+
template <class ..._Param>
|
2952
|
+
struct __check_complete<void (_Param...)>
|
2953
|
+
{
|
2954
|
+
};
|
2955
|
+
|
2933
2956
|
template <class _Rp, class _Class, class ..._Param>
|
2934
2957
|
struct __check_complete<_Rp (_Class::*)(_Param...)>
|
2935
2958
|
: private __check_complete<_Class>
|
@@ -3124,7 +3147,7 @@ struct __invoke_of
|
|
3124
3147
|
};
|
3125
3148
|
|
3126
3149
|
template <class _Fp, class ..._Args>
|
3127
|
-
class
|
3150
|
+
class _LIBCPP_TYPE_VIS_ONLY result_of<_Fp(_Args...)>
|
3128
3151
|
: public __invoke_of<_Fp, _Args...>
|
3129
3152
|
{
|
3130
3153
|
};
|
@@ -3243,6 +3266,27 @@ struct underlying_type
|
|
3243
3266
|
|
3244
3267
|
#endif // _LIBCXX_UNDERLYING_TYPE
|
3245
3268
|
|
3269
|
+
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
3270
|
+
|
3271
|
+
template <class _Tp>
|
3272
|
+
struct __has_operator_addressof_imp
|
3273
|
+
{
|
3274
|
+
template <class>
|
3275
|
+
static auto __test(__any) -> false_type;
|
3276
|
+
template <class _Up>
|
3277
|
+
static auto __test(_Up* __u)
|
3278
|
+
-> typename __select_2nd<decltype(__u->operator&()), true_type>::type;
|
3279
|
+
|
3280
|
+
static const bool value = decltype(__test<_Tp>(nullptr))::value;
|
3281
|
+
};
|
3282
|
+
|
3283
|
+
template <class _Tp>
|
3284
|
+
struct __has_operator_addressof
|
3285
|
+
: public integral_constant<bool, __has_operator_addressof_imp<_Tp>::value>
|
3286
|
+
{};
|
3287
|
+
|
3288
|
+
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
3289
|
+
|
3246
3290
|
_LIBCPP_END_NAMESPACE_STD
|
3247
3291
|
|
3248
3292
|
#endif // _LIBCPP_TYPE_TRAITS
|