webruby 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/webruby/config.rb +4 -9
- data/lib/webruby/rake/files.rake +2 -2
- data/modules/emscripten/AUTHORS +9 -1
- data/modules/emscripten/CONTRIBUTING.markdown +5 -0
- data/modules/emscripten/ChangeLog +435 -0
- data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +26 -0
- data/modules/emscripten/cmake/Platform/Emscripten.cmake +9 -2
- data/modules/emscripten/em++ +0 -2
- data/modules/emscripten/emcc +92 -32
- data/modules/emscripten/emlink.py +16 -13
- data/modules/emscripten/emmake +1 -1
- data/modules/emscripten/emrun +918 -0
- data/modules/emscripten/emrun.bat +2 -0
- data/modules/emscripten/emscripten.py +545 -20
- data/modules/emscripten/src/analyzer.js +6 -1
- data/modules/emscripten/src/compiler.js +25 -16
- data/modules/emscripten/src/emrun_postjs.js +20 -0
- data/modules/emscripten/{tests → src}/hello_world.js +0 -0
- data/modules/emscripten/src/intertyper.js +45 -16
- data/modules/emscripten/src/jsifier.js +78 -48
- data/modules/emscripten/src/library.js +381 -96
- data/modules/emscripten/src/library_browser.js +50 -53
- data/modules/emscripten/src/library_egl.js +66 -24
- data/modules/emscripten/src/library_fs.js +122 -90
- data/modules/emscripten/src/library_gl.js +739 -353
- data/modules/emscripten/src/library_glfw.js +9 -3
- data/modules/emscripten/src/library_glut.js +10 -5
- data/modules/emscripten/src/library_idbfs.js +14 -14
- data/modules/emscripten/src/library_memfs.js +65 -41
- data/modules/emscripten/src/library_nodefs.js +61 -9
- data/modules/emscripten/src/library_openal.js +4 -4
- data/modules/emscripten/src/library_path.js +9 -13
- data/modules/emscripten/src/library_sdl.js +301 -64
- data/modules/emscripten/src/library_sockfs.js +7 -5
- data/modules/emscripten/src/modules.js +62 -22
- data/modules/emscripten/src/parseTools.js +135 -102
- data/modules/emscripten/src/postamble.js +3 -4
- data/modules/emscripten/src/preamble.js +49 -29
- data/modules/emscripten/src/proxyClient.js +1 -1
- data/modules/emscripten/src/proxyWorker.js +10 -10
- data/modules/emscripten/src/relooper/Relooper.cpp +15 -4
- data/modules/emscripten/src/runtime.js +32 -8
- data/modules/emscripten/src/settings.js +25 -8
- data/modules/emscripten/src/shell.html +6 -3
- data/modules/emscripten/src/shell.js +13 -11
- data/modules/emscripten/src/simd.js +602 -432
- data/modules/emscripten/src/struct_info.json +22 -2
- data/modules/emscripten/src/utility.js +32 -17
- data/modules/emscripten/system/include/SDL/SDL_events.h +1 -0
- data/modules/emscripten/system/include/compat/ctype.h +17 -0
- data/modules/emscripten/system/include/compat/wchar.h +23 -0
- data/modules/emscripten/system/include/compat/wctype.h +23 -0
- data/modules/emscripten/system/include/emscripten/emmintrin.h +87 -0
- data/modules/emscripten/system/include/emscripten/emscripten.h +30 -4
- data/modules/emscripten/system/include/emscripten/vector.h +29 -1
- data/modules/emscripten/system/include/emscripten/xmmintrin.h +131 -0
- data/modules/emscripten/system/include/libcxx/CREDITS.TXT +9 -1
- data/modules/emscripten/system/include/libcxx/__bit_reference +8 -8
- data/modules/emscripten/system/include/libcxx/__config +95 -17
- data/modules/emscripten/system/include/libcxx/__debug +25 -4
- data/modules/emscripten/system/include/libcxx/__functional_03 +7 -7
- data/modules/emscripten/system/include/libcxx/__functional_base +169 -9
- data/modules/emscripten/system/include/libcxx/__functional_base_03 +1 -1
- data/modules/emscripten/system/include/libcxx/__hash_table +25 -25
- data/modules/emscripten/system/include/libcxx/__locale +21 -19
- data/modules/emscripten/system/include/libcxx/__mutex_base +2 -33
- data/modules/emscripten/system/include/libcxx/__split_buffer +9 -9
- data/modules/emscripten/system/include/libcxx/__std_stream +14 -0
- data/modules/emscripten/system/include/libcxx/__tree +35 -26
- data/modules/emscripten/system/include/libcxx/__tuple +15 -15
- data/modules/emscripten/system/include/libcxx/__tuple_03 +2 -2
- data/modules/emscripten/system/include/libcxx/__undef_min_max +8 -0
- data/modules/emscripten/system/include/libcxx/algorithm +121 -110
- data/modules/emscripten/system/include/libcxx/array +15 -15
- data/modules/emscripten/system/include/libcxx/bitset +4 -4
- data/modules/emscripten/system/include/libcxx/chrono +51 -17
- data/modules/emscripten/system/include/libcxx/cmath +25 -23
- data/modules/emscripten/system/include/libcxx/codecvt +21 -18
- data/modules/emscripten/system/include/libcxx/complex +48 -7
- data/modules/emscripten/system/include/libcxx/cstddef +1 -1
- data/modules/emscripten/system/include/libcxx/cstdio +8 -1
- data/modules/emscripten/system/include/libcxx/cstdlib +1 -1
- data/modules/emscripten/system/include/libcxx/cwchar +1 -1
- data/modules/emscripten/system/include/libcxx/deque +26 -12
- data/modules/emscripten/system/include/libcxx/dynarray +311 -0
- data/modules/emscripten/system/include/libcxx/exception +4 -4
- data/modules/emscripten/system/include/libcxx/ext/__hash +3 -3
- data/modules/emscripten/system/include/libcxx/ext/hash_map +19 -15
- data/modules/emscripten/system/include/libcxx/ext/hash_set +7 -3
- data/modules/emscripten/system/include/libcxx/forward_list +33 -7
- data/modules/emscripten/system/include/libcxx/fstream +4 -4
- data/modules/emscripten/system/include/libcxx/functional +200 -170
- data/modules/emscripten/system/include/libcxx/future +83 -39
- data/modules/emscripten/system/include/libcxx/initializer_list +24 -11
- data/modules/emscripten/system/include/libcxx/iomanip +147 -0
- data/modules/emscripten/system/include/libcxx/ios +24 -16
- data/modules/emscripten/system/include/libcxx/iosfwd +19 -19
- data/modules/emscripten/system/include/libcxx/istream +13 -8
- data/modules/emscripten/system/include/libcxx/iterator +108 -417
- data/modules/emscripten/system/include/libcxx/limits +8 -4
- data/modules/emscripten/system/include/libcxx/list +28 -8
- data/modules/emscripten/system/include/libcxx/locale +153 -390
- data/modules/emscripten/system/include/libcxx/map +280 -100
- data/modules/emscripten/system/include/libcxx/memory +49 -97
- data/modules/emscripten/system/include/libcxx/mutex +2 -2
- data/modules/emscripten/system/include/libcxx/new +43 -14
- data/modules/emscripten/system/include/libcxx/numeric +2 -2
- data/modules/emscripten/system/include/libcxx/optional +697 -0
- data/modules/emscripten/system/include/libcxx/ostream +17 -8
- data/modules/emscripten/system/include/libcxx/queue +5 -5
- data/modules/emscripten/system/include/libcxx/random +53 -51
- data/modules/emscripten/system/include/libcxx/ratio +11 -11
- data/modules/emscripten/system/include/libcxx/readme.txt +1 -1
- data/modules/emscripten/system/include/libcxx/regex +23 -20
- data/modules/emscripten/system/include/libcxx/scoped_allocator +1 -1
- data/modules/emscripten/system/include/libcxx/set +166 -2
- data/modules/emscripten/system/include/libcxx/shared_mutex +419 -0
- data/modules/emscripten/system/include/libcxx/sstream +4 -4
- data/modules/emscripten/system/include/libcxx/stack +3 -3
- data/modules/emscripten/system/include/libcxx/streambuf +5 -5
- data/modules/emscripten/system/include/libcxx/string +372 -324
- data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +99 -0
- data/modules/emscripten/system/include/libcxx/support/ibm/support.h +54 -0
- data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +326 -0
- data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +6 -6
- data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +15 -15
- data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +2 -0
- data/modules/emscripten/system/include/libcxx/support/win32/support.h +6 -1
- data/modules/emscripten/system/include/libcxx/system_error +14 -8
- data/modules/emscripten/system/include/libcxx/thread +7 -8
- data/modules/emscripten/system/include/libcxx/tuple +29 -88
- data/modules/emscripten/system/include/libcxx/type_traits +253 -209
- data/modules/emscripten/system/include/libcxx/typeindex +3 -3
- data/modules/emscripten/system/include/libcxx/unordered_map +162 -101
- data/modules/emscripten/system/include/libcxx/unordered_set +79 -2
- data/modules/emscripten/system/include/libcxx/utility +20 -20
- data/modules/emscripten/system/include/libcxx/valarray +23 -23
- data/modules/emscripten/system/include/libcxx/vector +114 -91
- data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +3352 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +35 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +1011 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +158 -0
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +231 -0
- data/modules/emscripten/system/lib/libcextra.symbols +7 -0
- data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +9 -1
- data/modules/emscripten/system/lib/libcxx/algorithm.cpp +1 -0
- data/modules/emscripten/system/lib/libcxx/debug.cpp +66 -42
- data/modules/emscripten/system/lib/libcxx/exception.cpp +88 -16
- data/modules/emscripten/system/lib/libcxx/future.cpp +6 -0
- data/modules/emscripten/system/lib/libcxx/ios.cpp +7 -2
- data/modules/emscripten/system/lib/libcxx/iostream.cpp +8 -8
- data/modules/emscripten/system/lib/libcxx/locale.cpp +38 -11
- data/modules/emscripten/system/lib/libcxx/mutex.cpp +3 -0
- data/modules/emscripten/system/lib/libcxx/new.cpp +44 -10
- data/modules/emscripten/system/lib/libcxx/optional.cpp +25 -0
- data/modules/emscripten/system/lib/libcxx/random.cpp +26 -0
- data/modules/emscripten/system/lib/libcxx/readme.txt +1 -1
- data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +101 -0
- data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +11 -7
- data/modules/emscripten/system/lib/libcxx/string.cpp +3 -1
- data/modules/emscripten/system/lib/libcxx/strstream.cpp +7 -7
- data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +12 -13
- data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +33 -36
- data/modules/emscripten/system/lib/libcxx/symbols +187 -168
- data/modules/emscripten/system/lib/libcxx/system_error.cpp +1 -0
- data/modules/emscripten/system/lib/libcxx/thread.cpp +7 -3
- data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +9 -6
- data/modules/emscripten/system/lib/libcxx/valarray.cpp +2 -0
- data/modules/emscripten/third_party/lzma.js/doit.bat +4 -0
- data/modules/emscripten/third_party/lzma.js/doit.sh +9 -2
- data/modules/emscripten/tools/cache.py +5 -7
- data/modules/emscripten/tools/cache.pyc +0 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +7 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +9 -1
- data/modules/emscripten/tools/eliminator/eliminator-test-output.js +3 -0
- data/modules/emscripten/tools/eliminator/eliminator-test.js +9 -1
- data/modules/emscripten/tools/file_packager.py +93 -50
- data/modules/emscripten/tools/js-optimizer.js +98 -48
- data/modules/emscripten/tools/js_optimizer.py +4 -4
- data/modules/emscripten/tools/js_optimizer.pyc +0 -0
- data/modules/emscripten/tools/jsrun.py +1 -1
- data/modules/emscripten/tools/jsrun.pyc +0 -0
- data/modules/emscripten/tools/response_file.py +6 -0
- data/modules/emscripten/tools/response_file.pyc +0 -0
- data/modules/emscripten/tools/settings_template_readonly.py +2 -0
- data/modules/emscripten/tools/shared.py +88 -34
- data/modules/emscripten/tools/shared.pyc +0 -0
- data/modules/emscripten/tools/split.py +21 -13
- data/modules/mruby/build_config.rb +7 -1
- data/modules/mruby/doc/compile/README.md +5 -9
- data/modules/mruby/include/mrbconf.h +5 -2
- data/modules/mruby/include/mruby/array.h +1 -0
- data/modules/mruby/include/mruby/compile.h +2 -4
- data/modules/mruby/include/mruby/dump.h +7 -16
- data/modules/mruby/include/mruby/hash.h +1 -1
- data/modules/mruby/include/mruby/irep.h +14 -2
- data/modules/mruby/include/mruby/khash.h +8 -7
- data/modules/mruby/include/mruby/string.h +1 -0
- data/modules/mruby/include/mruby/value.h +5 -2
- data/modules/mruby/include/mruby.h +12 -13
- data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +16 -6
- data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +18 -30
- data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +21 -0
- data/modules/mruby/mrbgems/mruby-math/src/math.c +1 -1
- data/modules/mruby/mrbgems/mruby-random/src/random.c +144 -47
- data/modules/mruby/mrbgems/mruby-random/test/random.rb +44 -0
- data/modules/mruby/mrbgems/mruby-struct/src/struct.c +5 -5
- data/modules/mruby/mrblib/numeric.rb +99 -33
- data/modules/mruby/src/array.c +11 -4
- data/modules/mruby/src/backtrace.c +2 -2
- data/modules/mruby/src/class.c +49 -30
- data/modules/mruby/src/codegen.c +131 -79
- data/modules/mruby/src/debug.c +1 -1
- data/modules/mruby/src/dump.c +213 -163
- data/modules/mruby/src/error.c +17 -17
- data/modules/mruby/src/error.h +1 -1
- data/modules/mruby/src/etc.c +10 -0
- data/modules/mruby/src/gc.c +35 -17
- data/modules/mruby/src/hash.c +5 -5
- data/modules/mruby/src/kernel.c +36 -14
- data/modules/mruby/src/load.c +238 -296
- data/modules/mruby/src/numeric.c +18 -98
- data/modules/mruby/src/object.c +3 -5
- data/modules/mruby/src/parse.y +63 -56
- data/modules/mruby/src/proc.c +8 -5
- data/modules/mruby/src/re.h +0 -1
- data/modules/mruby/src/state.c +65 -27
- data/modules/mruby/src/string.c +3 -31
- data/modules/mruby/src/symbol.c +3 -3
- data/modules/mruby/src/variable.c +12 -5
- data/modules/mruby/src/vm.c +90 -72
- data/modules/mruby/tasks/mruby_build.rake +10 -1
- data/modules/mruby/tasks/toolchains/gcc.rake +12 -2
- data/modules/mruby/tasks/toolchains/{vs2012.rake → visualcpp.rake} +1 -1
- data/modules/mruby/test/driver.c +3 -3
- data/modules/mruby/test/t/array.rb +5 -5
- data/modules/mruby/test/t/class.rb +14 -1
- data/modules/mruby/test/t/kernel.rb +4 -0
- data/modules/mruby/test/t/module.rb +4 -4
- data/modules/mruby/test/t/nameerror.rb +1 -1
- data/modules/mruby/tools/mrbc/mrbc.c +23 -17
- data/modules/mruby/travis_config.rb +10 -1
- metadata +28 -5
- data/modules/mruby/tasks/toolchains/vs2010.rake +0 -3
@@ -56,7 +56,7 @@ public:
|
|
56
56
|
|
57
57
|
// invoke
|
58
58
|
template <class... ArgTypes>
|
59
|
-
typename result_of<T(ArgTypes
|
59
|
+
typename result_of<T&(ArgTypes&&...)>::type
|
60
60
|
operator() (ArgTypes&&...) const;
|
61
61
|
};
|
62
62
|
|
@@ -358,18 +358,6 @@ template <class S, class T> const_mem_fun_ref_t<S,T> mem_fun_ref(S (
|
|
358
358
|
template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
|
359
359
|
|
360
360
|
template<class R, class T> unspecified mem_fn(R T::*);
|
361
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...));
|
362
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const);
|
363
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile);
|
364
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile);
|
365
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &);
|
366
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &);
|
367
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &);
|
368
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &);
|
369
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &&);
|
370
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &&);
|
371
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &&);
|
372
|
-
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &&);
|
373
361
|
|
374
362
|
class bad_function_call
|
375
363
|
: public exception
|
@@ -502,19 +490,22 @@ template <class _Tp = void>
|
|
502
490
|
#else
|
503
491
|
template <class _Tp>
|
504
492
|
#endif
|
505
|
-
struct
|
493
|
+
struct _LIBCPP_TYPE_VIS_ONLY plus : binary_function<_Tp, _Tp, _Tp>
|
506
494
|
{
|
507
|
-
_LIBCPP_INLINE_VISIBILITY
|
495
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
496
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
508
497
|
{return __x + __y;}
|
509
498
|
};
|
510
499
|
|
511
500
|
#if _LIBCPP_STD_VER > 11
|
512
501
|
template <>
|
513
|
-
struct
|
502
|
+
struct _LIBCPP_TYPE_VIS_ONLY plus<void>
|
514
503
|
{
|
515
504
|
template <class _T1, class _T2>
|
516
|
-
_LIBCPP_INLINE_VISIBILITY
|
505
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
506
|
+
auto operator()(_T1&& __t, _T2&& __u) const
|
517
507
|
{ return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
|
508
|
+
typedef void is_transparent;
|
518
509
|
};
|
519
510
|
#endif
|
520
511
|
|
@@ -524,19 +515,22 @@ template <class _Tp = void>
|
|
524
515
|
#else
|
525
516
|
template <class _Tp>
|
526
517
|
#endif
|
527
|
-
struct
|
518
|
+
struct _LIBCPP_TYPE_VIS_ONLY minus : binary_function<_Tp, _Tp, _Tp>
|
528
519
|
{
|
529
|
-
_LIBCPP_INLINE_VISIBILITY
|
520
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
521
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
530
522
|
{return __x - __y;}
|
531
523
|
};
|
532
524
|
|
533
525
|
#if _LIBCPP_STD_VER > 11
|
534
526
|
template <>
|
535
|
-
struct
|
527
|
+
struct _LIBCPP_TYPE_VIS_ONLY minus<void>
|
536
528
|
{
|
537
529
|
template <class _T1, class _T2>
|
538
|
-
_LIBCPP_INLINE_VISIBILITY
|
530
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
531
|
+
auto operator()(_T1&& __t, _T2&& __u) const
|
539
532
|
{ return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
|
533
|
+
typedef void is_transparent;
|
540
534
|
};
|
541
535
|
#endif
|
542
536
|
|
@@ -546,19 +540,22 @@ template <class _Tp = void>
|
|
546
540
|
#else
|
547
541
|
template <class _Tp>
|
548
542
|
#endif
|
549
|
-
struct
|
543
|
+
struct _LIBCPP_TYPE_VIS_ONLY multiplies : binary_function<_Tp, _Tp, _Tp>
|
550
544
|
{
|
551
|
-
_LIBCPP_INLINE_VISIBILITY
|
545
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
546
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
552
547
|
{return __x * __y;}
|
553
548
|
};
|
554
549
|
|
555
550
|
#if _LIBCPP_STD_VER > 11
|
556
551
|
template <>
|
557
|
-
struct
|
552
|
+
struct _LIBCPP_TYPE_VIS_ONLY multiplies<void>
|
558
553
|
{
|
559
554
|
template <class _T1, class _T2>
|
560
|
-
_LIBCPP_INLINE_VISIBILITY
|
555
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
556
|
+
auto operator()(_T1&& __t, _T2&& __u) const
|
561
557
|
{ return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
|
558
|
+
typedef void is_transparent;
|
562
559
|
};
|
563
560
|
#endif
|
564
561
|
|
@@ -568,19 +565,22 @@ template <class _Tp = void>
|
|
568
565
|
#else
|
569
566
|
template <class _Tp>
|
570
567
|
#endif
|
571
|
-
struct
|
568
|
+
struct _LIBCPP_TYPE_VIS_ONLY divides : binary_function<_Tp, _Tp, _Tp>
|
572
569
|
{
|
573
|
-
_LIBCPP_INLINE_VISIBILITY
|
570
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
571
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
574
572
|
{return __x / __y;}
|
575
573
|
};
|
576
574
|
|
577
575
|
#if _LIBCPP_STD_VER > 11
|
578
576
|
template <>
|
579
|
-
struct
|
577
|
+
struct _LIBCPP_TYPE_VIS_ONLY divides<void>
|
580
578
|
{
|
581
579
|
template <class _T1, class _T2>
|
582
|
-
_LIBCPP_INLINE_VISIBILITY
|
580
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
581
|
+
auto operator()(_T1&& __t, _T2&& __u) const
|
583
582
|
{ return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
|
583
|
+
typedef void is_transparent;
|
584
584
|
};
|
585
585
|
#endif
|
586
586
|
|
@@ -590,19 +590,22 @@ template <class _Tp = void>
|
|
590
590
|
#else
|
591
591
|
template <class _Tp>
|
592
592
|
#endif
|
593
|
-
struct
|
593
|
+
struct _LIBCPP_TYPE_VIS_ONLY modulus : binary_function<_Tp, _Tp, _Tp>
|
594
594
|
{
|
595
|
-
_LIBCPP_INLINE_VISIBILITY
|
595
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
596
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
596
597
|
{return __x % __y;}
|
597
598
|
};
|
598
599
|
|
599
600
|
#if _LIBCPP_STD_VER > 11
|
600
601
|
template <>
|
601
|
-
struct
|
602
|
+
struct _LIBCPP_TYPE_VIS_ONLY modulus<void>
|
602
603
|
{
|
603
604
|
template <class _T1, class _T2>
|
604
|
-
_LIBCPP_INLINE_VISIBILITY
|
605
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
606
|
+
auto operator()(_T1&& __t, _T2&& __u) const
|
605
607
|
{ return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
|
608
|
+
typedef void is_transparent;
|
606
609
|
};
|
607
610
|
#endif
|
608
611
|
|
@@ -612,19 +615,22 @@ template <class _Tp = void>
|
|
612
615
|
#else
|
613
616
|
template <class _Tp>
|
614
617
|
#endif
|
615
|
-
struct
|
618
|
+
struct _LIBCPP_TYPE_VIS_ONLY negate : unary_function<_Tp, _Tp>
|
616
619
|
{
|
617
|
-
_LIBCPP_INLINE_VISIBILITY
|
620
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
621
|
+
_Tp operator()(const _Tp& __x) const
|
618
622
|
{return -__x;}
|
619
623
|
};
|
620
624
|
|
621
625
|
#if _LIBCPP_STD_VER > 11
|
622
626
|
template <>
|
623
|
-
struct
|
627
|
+
struct _LIBCPP_TYPE_VIS_ONLY negate<void>
|
624
628
|
{
|
625
629
|
template <class _Tp>
|
626
|
-
_LIBCPP_INLINE_VISIBILITY
|
630
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
631
|
+
auto operator()(_Tp&& __x) const
|
627
632
|
{ return -_VSTD::forward<_Tp>(__x); }
|
633
|
+
typedef void is_transparent;
|
628
634
|
};
|
629
635
|
#endif
|
630
636
|
|
@@ -634,19 +640,22 @@ template <class _Tp = void>
|
|
634
640
|
#else
|
635
641
|
template <class _Tp>
|
636
642
|
#endif
|
637
|
-
struct
|
643
|
+
struct _LIBCPP_TYPE_VIS_ONLY equal_to : binary_function<_Tp, _Tp, bool>
|
638
644
|
{
|
639
|
-
_LIBCPP_INLINE_VISIBILITY
|
645
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
646
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
640
647
|
{return __x == __y;}
|
641
648
|
};
|
642
649
|
|
643
650
|
#if _LIBCPP_STD_VER > 11
|
644
651
|
template <>
|
645
|
-
struct
|
652
|
+
struct _LIBCPP_TYPE_VIS_ONLY equal_to<void>
|
646
653
|
{
|
647
|
-
template <class _T1, class _T2>
|
654
|
+
template <class _T1, class _T2>
|
655
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
648
656
|
auto operator()(_T1&& __t, _T2&& __u) const
|
649
657
|
{ return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
|
658
|
+
typedef void is_transparent;
|
650
659
|
};
|
651
660
|
#endif
|
652
661
|
|
@@ -656,19 +665,22 @@ template <class _Tp = void>
|
|
656
665
|
#else
|
657
666
|
template <class _Tp>
|
658
667
|
#endif
|
659
|
-
struct
|
668
|
+
struct _LIBCPP_TYPE_VIS_ONLY not_equal_to : binary_function<_Tp, _Tp, bool>
|
660
669
|
{
|
661
|
-
_LIBCPP_INLINE_VISIBILITY
|
670
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
671
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
662
672
|
{return __x != __y;}
|
663
673
|
};
|
664
674
|
|
665
675
|
#if _LIBCPP_STD_VER > 11
|
666
676
|
template <>
|
667
|
-
struct
|
677
|
+
struct _LIBCPP_TYPE_VIS_ONLY not_equal_to<void>
|
668
678
|
{
|
669
|
-
template <class _T1, class _T2>
|
679
|
+
template <class _T1, class _T2>
|
680
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
670
681
|
auto operator()(_T1&& __t, _T2&& __u) const
|
671
682
|
{ return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
|
683
|
+
typedef void is_transparent;
|
672
684
|
};
|
673
685
|
#endif
|
674
686
|
|
@@ -678,19 +690,22 @@ template <class _Tp = void>
|
|
678
690
|
#else
|
679
691
|
template <class _Tp>
|
680
692
|
#endif
|
681
|
-
struct
|
693
|
+
struct _LIBCPP_TYPE_VIS_ONLY greater : binary_function<_Tp, _Tp, bool>
|
682
694
|
{
|
683
|
-
_LIBCPP_INLINE_VISIBILITY
|
695
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
696
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
684
697
|
{return __x > __y;}
|
685
698
|
};
|
686
699
|
|
687
700
|
#if _LIBCPP_STD_VER > 11
|
688
701
|
template <>
|
689
|
-
struct
|
702
|
+
struct _LIBCPP_TYPE_VIS_ONLY greater<void>
|
690
703
|
{
|
691
|
-
template <class _T1, class _T2>
|
704
|
+
template <class _T1, class _T2>
|
705
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
692
706
|
auto operator()(_T1&& __t, _T2&& __u) const
|
693
707
|
{ return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
|
708
|
+
typedef void is_transparent;
|
694
709
|
};
|
695
710
|
#endif
|
696
711
|
|
@@ -702,19 +717,22 @@ template <class _Tp = void>
|
|
702
717
|
#else
|
703
718
|
template <class _Tp>
|
704
719
|
#endif
|
705
|
-
struct
|
720
|
+
struct _LIBCPP_TYPE_VIS_ONLY greater_equal : binary_function<_Tp, _Tp, bool>
|
706
721
|
{
|
707
|
-
_LIBCPP_INLINE_VISIBILITY
|
722
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
723
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
708
724
|
{return __x >= __y;}
|
709
725
|
};
|
710
726
|
|
711
727
|
#if _LIBCPP_STD_VER > 11
|
712
728
|
template <>
|
713
|
-
struct
|
729
|
+
struct _LIBCPP_TYPE_VIS_ONLY greater_equal<void>
|
714
730
|
{
|
715
|
-
template <class _T1, class _T2>
|
731
|
+
template <class _T1, class _T2>
|
732
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
716
733
|
auto operator()(_T1&& __t, _T2&& __u) const
|
717
734
|
{ return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
|
735
|
+
typedef void is_transparent;
|
718
736
|
};
|
719
737
|
#endif
|
720
738
|
|
@@ -724,19 +742,22 @@ template <class _Tp = void>
|
|
724
742
|
#else
|
725
743
|
template <class _Tp>
|
726
744
|
#endif
|
727
|
-
struct
|
745
|
+
struct _LIBCPP_TYPE_VIS_ONLY less_equal : binary_function<_Tp, _Tp, bool>
|
728
746
|
{
|
729
|
-
_LIBCPP_INLINE_VISIBILITY
|
747
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
748
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
730
749
|
{return __x <= __y;}
|
731
750
|
};
|
732
751
|
|
733
752
|
#if _LIBCPP_STD_VER > 11
|
734
753
|
template <>
|
735
|
-
struct
|
754
|
+
struct _LIBCPP_TYPE_VIS_ONLY less_equal<void>
|
736
755
|
{
|
737
|
-
template <class _T1, class _T2>
|
756
|
+
template <class _T1, class _T2>
|
757
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
738
758
|
auto operator()(_T1&& __t, _T2&& __u) const
|
739
759
|
{ return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
|
760
|
+
typedef void is_transparent;
|
740
761
|
};
|
741
762
|
#endif
|
742
763
|
|
@@ -746,19 +767,22 @@ template <class _Tp = void>
|
|
746
767
|
#else
|
747
768
|
template <class _Tp>
|
748
769
|
#endif
|
749
|
-
struct
|
770
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_and : binary_function<_Tp, _Tp, bool>
|
750
771
|
{
|
751
|
-
_LIBCPP_INLINE_VISIBILITY
|
772
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
773
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
752
774
|
{return __x && __y;}
|
753
775
|
};
|
754
776
|
|
755
777
|
#if _LIBCPP_STD_VER > 11
|
756
778
|
template <>
|
757
|
-
struct
|
779
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_and<void>
|
758
780
|
{
|
759
|
-
template <class _T1, class _T2>
|
781
|
+
template <class _T1, class _T2>
|
782
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
760
783
|
auto operator()(_T1&& __t, _T2&& __u) const
|
761
784
|
{ return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
|
785
|
+
typedef void is_transparent;
|
762
786
|
};
|
763
787
|
#endif
|
764
788
|
|
@@ -768,19 +792,22 @@ template <class _Tp = void>
|
|
768
792
|
#else
|
769
793
|
template <class _Tp>
|
770
794
|
#endif
|
771
|
-
struct
|
795
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_or : binary_function<_Tp, _Tp, bool>
|
772
796
|
{
|
773
|
-
_LIBCPP_INLINE_VISIBILITY
|
797
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
798
|
+
bool operator()(const _Tp& __x, const _Tp& __y) const
|
774
799
|
{return __x || __y;}
|
775
800
|
};
|
776
801
|
|
777
802
|
#if _LIBCPP_STD_VER > 11
|
778
803
|
template <>
|
779
|
-
struct
|
804
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_or<void>
|
780
805
|
{
|
781
|
-
template <class _T1, class _T2>
|
806
|
+
template <class _T1, class _T2>
|
807
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
782
808
|
auto operator()(_T1&& __t, _T2&& __u) const
|
783
809
|
{ return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
|
810
|
+
typedef void is_transparent;
|
784
811
|
};
|
785
812
|
#endif
|
786
813
|
|
@@ -790,19 +817,22 @@ template <class _Tp = void>
|
|
790
817
|
#else
|
791
818
|
template <class _Tp>
|
792
819
|
#endif
|
793
|
-
struct
|
820
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_not : unary_function<_Tp, bool>
|
794
821
|
{
|
795
|
-
_LIBCPP_INLINE_VISIBILITY
|
822
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
823
|
+
bool operator()(const _Tp& __x) const
|
796
824
|
{return !__x;}
|
797
825
|
};
|
798
826
|
|
799
827
|
#if _LIBCPP_STD_VER > 11
|
800
828
|
template <>
|
801
|
-
struct
|
829
|
+
struct _LIBCPP_TYPE_VIS_ONLY logical_not<void>
|
802
830
|
{
|
803
831
|
template <class _Tp>
|
804
|
-
_LIBCPP_INLINE_VISIBILITY
|
832
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
833
|
+
auto operator()(_Tp&& __x) const
|
805
834
|
{ return !_VSTD::forward<_Tp>(__x); }
|
835
|
+
typedef void is_transparent;
|
806
836
|
};
|
807
837
|
#endif
|
808
838
|
|
@@ -812,19 +842,22 @@ template <class _Tp = void>
|
|
812
842
|
#else
|
813
843
|
template <class _Tp>
|
814
844
|
#endif
|
815
|
-
struct
|
845
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_and : binary_function<_Tp, _Tp, _Tp>
|
816
846
|
{
|
817
|
-
_LIBCPP_INLINE_VISIBILITY
|
847
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
848
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
818
849
|
{return __x & __y;}
|
819
850
|
};
|
820
851
|
|
821
852
|
#if _LIBCPP_STD_VER > 11
|
822
853
|
template <>
|
823
|
-
struct
|
854
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_and<void>
|
824
855
|
{
|
825
|
-
template <class _T1, class _T2>
|
856
|
+
template <class _T1, class _T2>
|
857
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
826
858
|
auto operator()(_T1&& __t, _T2&& __u) const
|
827
859
|
{ return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
|
860
|
+
typedef void is_transparent;
|
828
861
|
};
|
829
862
|
#endif
|
830
863
|
|
@@ -834,19 +867,22 @@ template <class _Tp = void>
|
|
834
867
|
#else
|
835
868
|
template <class _Tp>
|
836
869
|
#endif
|
837
|
-
struct
|
870
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_or : binary_function<_Tp, _Tp, _Tp>
|
838
871
|
{
|
839
|
-
_LIBCPP_INLINE_VISIBILITY
|
872
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
873
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
840
874
|
{return __x | __y;}
|
841
875
|
};
|
842
876
|
|
843
877
|
#if _LIBCPP_STD_VER > 11
|
844
878
|
template <>
|
845
|
-
struct
|
879
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_or<void>
|
846
880
|
{
|
847
|
-
template <class _T1, class _T2>
|
881
|
+
template <class _T1, class _T2>
|
882
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
848
883
|
auto operator()(_T1&& __t, _T2&& __u) const
|
849
884
|
{ return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
|
885
|
+
typedef void is_transparent;
|
850
886
|
};
|
851
887
|
#endif
|
852
888
|
|
@@ -856,79 +892,89 @@ template <class _Tp = void>
|
|
856
892
|
#else
|
857
893
|
template <class _Tp>
|
858
894
|
#endif
|
859
|
-
struct
|
895
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_xor : binary_function<_Tp, _Tp, _Tp>
|
860
896
|
{
|
861
|
-
_LIBCPP_INLINE_VISIBILITY
|
897
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
898
|
+
_Tp operator()(const _Tp& __x, const _Tp& __y) const
|
862
899
|
{return __x ^ __y;}
|
863
900
|
};
|
864
901
|
|
865
902
|
#if _LIBCPP_STD_VER > 11
|
866
903
|
template <>
|
867
|
-
struct
|
904
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_xor<void>
|
868
905
|
{
|
869
|
-
template <class _T1, class _T2>
|
906
|
+
template <class _T1, class _T2>
|
907
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
870
908
|
auto operator()(_T1&& __t, _T2&& __u) const
|
871
909
|
{ return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
|
910
|
+
typedef void is_transparent;
|
872
911
|
};
|
873
912
|
#endif
|
874
913
|
|
875
914
|
|
876
915
|
#if _LIBCPP_STD_VER > 11
|
877
916
|
template <class _Tp = void>
|
878
|
-
struct
|
917
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_not : unary_function<_Tp, _Tp>
|
879
918
|
{
|
880
|
-
_LIBCPP_INLINE_VISIBILITY
|
919
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
920
|
+
_Tp operator()(const _Tp& __x) const
|
881
921
|
{return ~__x;}
|
882
922
|
};
|
883
923
|
|
884
924
|
template <>
|
885
|
-
struct
|
925
|
+
struct _LIBCPP_TYPE_VIS_ONLY bit_not<void>
|
886
926
|
{
|
887
927
|
template <class _Tp>
|
888
|
-
_LIBCPP_INLINE_VISIBILITY
|
928
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
929
|
+
auto operator()(_Tp&& __x) const
|
889
930
|
{ return ~_VSTD::forward<_Tp>(__x); }
|
931
|
+
typedef void is_transparent;
|
890
932
|
};
|
891
933
|
#endif
|
892
934
|
|
893
935
|
template <class _Predicate>
|
894
|
-
class
|
936
|
+
class _LIBCPP_TYPE_VIS_ONLY unary_negate
|
895
937
|
: public unary_function<typename _Predicate::argument_type, bool>
|
896
938
|
{
|
897
939
|
_Predicate __pred_;
|
898
940
|
public:
|
899
|
-
_LIBCPP_INLINE_VISIBILITY
|
941
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
942
|
+
explicit unary_negate(const _Predicate& __pred)
|
900
943
|
: __pred_(__pred) {}
|
901
|
-
_LIBCPP_INLINE_VISIBILITY
|
944
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
945
|
+
bool operator()(const typename _Predicate::argument_type& __x) const
|
902
946
|
{return !__pred_(__x);}
|
903
947
|
};
|
904
948
|
|
905
949
|
template <class _Predicate>
|
906
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
950
|
+
inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
907
951
|
unary_negate<_Predicate>
|
908
952
|
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
|
909
953
|
|
910
954
|
template <class _Predicate>
|
911
|
-
class
|
955
|
+
class _LIBCPP_TYPE_VIS_ONLY binary_negate
|
912
956
|
: public binary_function<typename _Predicate::first_argument_type,
|
913
957
|
typename _Predicate::second_argument_type,
|
914
958
|
bool>
|
915
959
|
{
|
916
960
|
_Predicate __pred_;
|
917
961
|
public:
|
918
|
-
_LIBCPP_INLINE_VISIBILITY explicit
|
919
|
-
|
920
|
-
|
962
|
+
_LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
|
963
|
+
binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
|
964
|
+
|
965
|
+
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
966
|
+
bool operator()(const typename _Predicate::first_argument_type& __x,
|
921
967
|
const typename _Predicate::second_argument_type& __y) const
|
922
968
|
{return !__pred_(__x, __y);}
|
923
969
|
};
|
924
970
|
|
925
971
|
template <class _Predicate>
|
926
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
972
|
+
inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
927
973
|
binary_negate<_Predicate>
|
928
974
|
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
|
929
975
|
|
930
976
|
template <class __Operation>
|
931
|
-
class
|
977
|
+
class _LIBCPP_TYPE_VIS_ONLY binder1st
|
932
978
|
: public unary_function<typename __Operation::second_argument_type,
|
933
979
|
typename __Operation::result_type>
|
934
980
|
{
|
@@ -954,7 +1000,7 @@ bind1st(const __Operation& __op, const _Tp& __x)
|
|
954
1000
|
{return binder1st<__Operation>(__op, __x);}
|
955
1001
|
|
956
1002
|
template <class __Operation>
|
957
|
-
class
|
1003
|
+
class _LIBCPP_TYPE_VIS_ONLY binder2nd
|
958
1004
|
: public unary_function<typename __Operation::first_argument_type,
|
959
1005
|
typename __Operation::result_type>
|
960
1006
|
{
|
@@ -980,7 +1026,7 @@ bind2nd(const __Operation& __op, const _Tp& __x)
|
|
980
1026
|
{return binder2nd<__Operation>(__op, __x);}
|
981
1027
|
|
982
1028
|
template <class _Arg, class _Result>
|
983
|
-
class
|
1029
|
+
class _LIBCPP_TYPE_VIS_ONLY pointer_to_unary_function
|
984
1030
|
: public unary_function<_Arg, _Result>
|
985
1031
|
{
|
986
1032
|
_Result (*__f_)(_Arg);
|
@@ -998,7 +1044,7 @@ ptr_fun(_Result (*__f)(_Arg))
|
|
998
1044
|
{return pointer_to_unary_function<_Arg,_Result>(__f);}
|
999
1045
|
|
1000
1046
|
template <class _Arg1, class _Arg2, class _Result>
|
1001
|
-
class
|
1047
|
+
class _LIBCPP_TYPE_VIS_ONLY pointer_to_binary_function
|
1002
1048
|
: public binary_function<_Arg1, _Arg2, _Result>
|
1003
1049
|
{
|
1004
1050
|
_Result (*__f_)(_Arg1, _Arg2);
|
@@ -1016,7 +1062,7 @@ ptr_fun(_Result (*__f)(_Arg1,_Arg2))
|
|
1016
1062
|
{return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}
|
1017
1063
|
|
1018
1064
|
template<class _Sp, class _Tp>
|
1019
|
-
class
|
1065
|
+
class _LIBCPP_TYPE_VIS_ONLY mem_fun_t : public unary_function<_Tp*, _Sp>
|
1020
1066
|
{
|
1021
1067
|
_Sp (_Tp::*__p_)();
|
1022
1068
|
public:
|
@@ -1027,7 +1073,7 @@ public:
|
|
1027
1073
|
};
|
1028
1074
|
|
1029
1075
|
template<class _Sp, class _Tp, class _Ap>
|
1030
|
-
class
|
1076
|
+
class _LIBCPP_TYPE_VIS_ONLY mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
|
1031
1077
|
{
|
1032
1078
|
_Sp (_Tp::*__p_)(_Ap);
|
1033
1079
|
public:
|
@@ -1050,7 +1096,7 @@ mem_fun(_Sp (_Tp::*__f)(_Ap))
|
|
1050
1096
|
{return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
|
1051
1097
|
|
1052
1098
|
template<class _Sp, class _Tp>
|
1053
|
-
class
|
1099
|
+
class _LIBCPP_TYPE_VIS_ONLY mem_fun_ref_t : public unary_function<_Tp, _Sp>
|
1054
1100
|
{
|
1055
1101
|
_Sp (_Tp::*__p_)();
|
1056
1102
|
public:
|
@@ -1061,7 +1107,7 @@ public:
|
|
1061
1107
|
};
|
1062
1108
|
|
1063
1109
|
template<class _Sp, class _Tp, class _Ap>
|
1064
|
-
class
|
1110
|
+
class _LIBCPP_TYPE_VIS_ONLY mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
|
1065
1111
|
{
|
1066
1112
|
_Sp (_Tp::*__p_)(_Ap);
|
1067
1113
|
public:
|
@@ -1084,7 +1130,7 @@ mem_fun_ref(_Sp (_Tp::*__f)(_Ap))
|
|
1084
1130
|
{return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
|
1085
1131
|
|
1086
1132
|
template <class _Sp, class _Tp>
|
1087
|
-
class
|
1133
|
+
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_t : public unary_function<const _Tp*, _Sp>
|
1088
1134
|
{
|
1089
1135
|
_Sp (_Tp::*__p_)() const;
|
1090
1136
|
public:
|
@@ -1095,7 +1141,7 @@ public:
|
|
1095
1141
|
};
|
1096
1142
|
|
1097
1143
|
template <class _Sp, class _Tp, class _Ap>
|
1098
|
-
class
|
1144
|
+
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
|
1099
1145
|
{
|
1100
1146
|
_Sp (_Tp::*__p_)(_Ap) const;
|
1101
1147
|
public:
|
@@ -1118,7 +1164,7 @@ mem_fun(_Sp (_Tp::*__f)(_Ap) const)
|
|
1118
1164
|
{return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
|
1119
1165
|
|
1120
1166
|
template <class _Sp, class _Tp>
|
1121
|
-
class
|
1167
|
+
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
|
1122
1168
|
{
|
1123
1169
|
_Sp (_Tp::*__p_)() const;
|
1124
1170
|
public:
|
@@ -1129,7 +1175,7 @@ public:
|
|
1129
1175
|
};
|
1130
1176
|
|
1131
1177
|
template <class _Sp, class _Tp, class _Ap>
|
1132
|
-
class
|
1178
|
+
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_ref_t
|
1133
1179
|
: public binary_function<_Tp, _Ap, _Sp>
|
1134
1180
|
{
|
1135
1181
|
_Sp (_Tp::*__p_)(_Ap) const;
|
@@ -1189,38 +1235,6 @@ mem_fn(_Rp _Tp::* __pm)
|
|
1189
1235
|
return __mem_fn<_Rp _Tp::*>(__pm);
|
1190
1236
|
}
|
1191
1237
|
|
1192
|
-
template<class _Rp, class _Tp, class ..._Args>
|
1193
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1194
|
-
__mem_fn<_Rp (_Tp::*)(_Args...)>
|
1195
|
-
mem_fn(_Rp (_Tp::* __pm)(_Args...))
|
1196
|
-
{
|
1197
|
-
return __mem_fn<_Rp (_Tp::*)(_Args...)>(__pm);
|
1198
|
-
}
|
1199
|
-
|
1200
|
-
template<class _Rp, class _Tp, class ..._Args>
|
1201
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1202
|
-
__mem_fn<_Rp (_Tp::*)(_Args...) const>
|
1203
|
-
mem_fn(_Rp (_Tp::* __pm)(_Args...) const)
|
1204
|
-
{
|
1205
|
-
return __mem_fn<_Rp (_Tp::*)(_Args...) const>(__pm);
|
1206
|
-
}
|
1207
|
-
|
1208
|
-
template<class _Rp, class _Tp, class ..._Args>
|
1209
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1210
|
-
__mem_fn<_Rp (_Tp::*)(_Args...) volatile>
|
1211
|
-
mem_fn(_Rp (_Tp::* __pm)(_Args...) volatile)
|
1212
|
-
{
|
1213
|
-
return __mem_fn<_Rp (_Tp::*)(_Args...) volatile>(__pm);
|
1214
|
-
}
|
1215
|
-
|
1216
|
-
template<class _Rp, class _Tp, class ..._Args>
|
1217
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1218
|
-
__mem_fn<_Rp (_Tp::*)(_Args...) const volatile>
|
1219
|
-
mem_fn(_Rp (_Tp::* __pm)(_Args...) const volatile)
|
1220
|
-
{
|
1221
|
-
return __mem_fn<_Rp (_Tp::*)(_Args...) const volatile>(__pm);
|
1222
|
-
}
|
1223
|
-
|
1224
1238
|
// bad_function_call
|
1225
1239
|
|
1226
1240
|
class _LIBCPP_EXCEPTION_ABI bad_function_call
|
@@ -1228,7 +1242,7 @@ class _LIBCPP_EXCEPTION_ABI bad_function_call
|
|
1228
1242
|
{
|
1229
1243
|
};
|
1230
1244
|
|
1231
|
-
template<class _Fp> class
|
1245
|
+
template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
|
1232
1246
|
|
1233
1247
|
namespace __function
|
1234
1248
|
{
|
@@ -1379,7 +1393,7 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
|
|
1379
1393
|
} // __function
|
1380
1394
|
|
1381
1395
|
template<class _Rp, class ..._ArgTypes>
|
1382
|
-
class
|
1396
|
+
class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_ArgTypes...)>
|
1383
1397
|
: public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
|
1384
1398
|
public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
|
1385
1399
|
{
|
@@ -1801,11 +1815,11 @@ swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCE
|
|
1801
1815
|
{return __x.swap(__y);}
|
1802
1816
|
|
1803
1817
|
template<class _Tp> struct __is_bind_expression : public false_type {};
|
1804
|
-
template<class _Tp> struct
|
1818
|
+
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
|
1805
1819
|
: public __is_bind_expression<typename remove_cv<_Tp>::type> {};
|
1806
1820
|
|
1807
1821
|
template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
|
1808
|
-
template<class _Tp> struct
|
1822
|
+
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
|
1809
1823
|
: public __is_placeholder<typename remove_cv<_Tp>::type> {};
|
1810
1824
|
|
1811
1825
|
namespace placeholders
|
@@ -1813,16 +1827,16 @@ namespace placeholders
|
|
1813
1827
|
|
1814
1828
|
template <int _Np> struct __ph {};
|
1815
1829
|
|
1816
|
-
extern __ph<1> _1;
|
1817
|
-
extern __ph<2> _2;
|
1818
|
-
extern __ph<3> _3;
|
1819
|
-
extern __ph<4> _4;
|
1820
|
-
extern __ph<5> _5;
|
1821
|
-
extern __ph<6> _6;
|
1822
|
-
extern __ph<7> _7;
|
1823
|
-
extern __ph<8> _8;
|
1824
|
-
extern __ph<9> _9;
|
1825
|
-
extern __ph<10> _10;
|
1830
|
+
_LIBCPP_FUNC_VIS extern __ph<1> _1;
|
1831
|
+
_LIBCPP_FUNC_VIS extern __ph<2> _2;
|
1832
|
+
_LIBCPP_FUNC_VIS extern __ph<3> _3;
|
1833
|
+
_LIBCPP_FUNC_VIS extern __ph<4> _4;
|
1834
|
+
_LIBCPP_FUNC_VIS extern __ph<5> _5;
|
1835
|
+
_LIBCPP_FUNC_VIS extern __ph<6> _6;
|
1836
|
+
_LIBCPP_FUNC_VIS extern __ph<7> _7;
|
1837
|
+
_LIBCPP_FUNC_VIS extern __ph<8> _8;
|
1838
|
+
_LIBCPP_FUNC_VIS extern __ph<9> _9;
|
1839
|
+
_LIBCPP_FUNC_VIS extern __ph<10> _10;
|
1826
1840
|
|
1827
1841
|
} // placeholders
|
1828
1842
|
|
@@ -2184,7 +2198,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
|
2184
2198
|
#endif // _LIBCPP_HAS_NO_VARIADICS
|
2185
2199
|
|
2186
2200
|
template <>
|
2187
|
-
struct
|
2201
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<bool>
|
2188
2202
|
: public unary_function<bool, size_t>
|
2189
2203
|
{
|
2190
2204
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2192,7 +2206,7 @@ struct _LIBCPP_TYPE_VIS hash<bool>
|
|
2192
2206
|
};
|
2193
2207
|
|
2194
2208
|
template <>
|
2195
|
-
struct
|
2209
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<char>
|
2196
2210
|
: public unary_function<char, size_t>
|
2197
2211
|
{
|
2198
2212
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2200,7 +2214,7 @@ struct _LIBCPP_TYPE_VIS hash<char>
|
|
2200
2214
|
};
|
2201
2215
|
|
2202
2216
|
template <>
|
2203
|
-
struct
|
2217
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
|
2204
2218
|
: public unary_function<signed char, size_t>
|
2205
2219
|
{
|
2206
2220
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2208,7 +2222,7 @@ struct _LIBCPP_TYPE_VIS hash<signed char>
|
|
2208
2222
|
};
|
2209
2223
|
|
2210
2224
|
template <>
|
2211
|
-
struct
|
2225
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
|
2212
2226
|
: public unary_function<unsigned char, size_t>
|
2213
2227
|
{
|
2214
2228
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2218,7 +2232,7 @@ struct _LIBCPP_TYPE_VIS hash<unsigned char>
|
|
2218
2232
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
2219
2233
|
|
2220
2234
|
template <>
|
2221
|
-
struct
|
2235
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<char16_t>
|
2222
2236
|
: public unary_function<char16_t, size_t>
|
2223
2237
|
{
|
2224
2238
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2226,7 +2240,7 @@ struct _LIBCPP_TYPE_VIS hash<char16_t>
|
|
2226
2240
|
};
|
2227
2241
|
|
2228
2242
|
template <>
|
2229
|
-
struct
|
2243
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<char32_t>
|
2230
2244
|
: public unary_function<char32_t, size_t>
|
2231
2245
|
{
|
2232
2246
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2236,7 +2250,7 @@ struct _LIBCPP_TYPE_VIS hash<char32_t>
|
|
2236
2250
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
2237
2251
|
|
2238
2252
|
template <>
|
2239
|
-
struct
|
2253
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<wchar_t>
|
2240
2254
|
: public unary_function<wchar_t, size_t>
|
2241
2255
|
{
|
2242
2256
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2244,7 +2258,7 @@ struct _LIBCPP_TYPE_VIS hash<wchar_t>
|
|
2244
2258
|
};
|
2245
2259
|
|
2246
2260
|
template <>
|
2247
|
-
struct
|
2261
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<short>
|
2248
2262
|
: public unary_function<short, size_t>
|
2249
2263
|
{
|
2250
2264
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2252,7 +2266,7 @@ struct _LIBCPP_TYPE_VIS hash<short>
|
|
2252
2266
|
};
|
2253
2267
|
|
2254
2268
|
template <>
|
2255
|
-
struct
|
2269
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
|
2256
2270
|
: public unary_function<unsigned short, size_t>
|
2257
2271
|
{
|
2258
2272
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2260,7 +2274,7 @@ struct _LIBCPP_TYPE_VIS hash<unsigned short>
|
|
2260
2274
|
};
|
2261
2275
|
|
2262
2276
|
template <>
|
2263
|
-
struct
|
2277
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<int>
|
2264
2278
|
: public unary_function<int, size_t>
|
2265
2279
|
{
|
2266
2280
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2268,7 +2282,7 @@ struct _LIBCPP_TYPE_VIS hash<int>
|
|
2268
2282
|
};
|
2269
2283
|
|
2270
2284
|
template <>
|
2271
|
-
struct
|
2285
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
|
2272
2286
|
: public unary_function<unsigned int, size_t>
|
2273
2287
|
{
|
2274
2288
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2276,7 +2290,7 @@ struct _LIBCPP_TYPE_VIS hash<unsigned int>
|
|
2276
2290
|
};
|
2277
2291
|
|
2278
2292
|
template <>
|
2279
|
-
struct
|
2293
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<long>
|
2280
2294
|
: public unary_function<long, size_t>
|
2281
2295
|
{
|
2282
2296
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2284,7 +2298,7 @@ struct _LIBCPP_TYPE_VIS hash<long>
|
|
2284
2298
|
};
|
2285
2299
|
|
2286
2300
|
template <>
|
2287
|
-
struct
|
2301
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
|
2288
2302
|
: public unary_function<unsigned long, size_t>
|
2289
2303
|
{
|
2290
2304
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2292,19 +2306,19 @@ struct _LIBCPP_TYPE_VIS hash<unsigned long>
|
|
2292
2306
|
};
|
2293
2307
|
|
2294
2308
|
template <>
|
2295
|
-
struct
|
2309
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<long long>
|
2296
2310
|
: public __scalar_hash<long long>
|
2297
2311
|
{
|
2298
2312
|
};
|
2299
2313
|
|
2300
2314
|
template <>
|
2301
|
-
struct
|
2315
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long long>
|
2302
2316
|
: public __scalar_hash<unsigned long long>
|
2303
2317
|
{
|
2304
2318
|
};
|
2305
2319
|
|
2306
2320
|
template <>
|
2307
|
-
struct
|
2321
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<float>
|
2308
2322
|
: public __scalar_hash<float>
|
2309
2323
|
{
|
2310
2324
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2318,7 +2332,7 @@ struct _LIBCPP_TYPE_VIS hash<float>
|
|
2318
2332
|
};
|
2319
2333
|
|
2320
2334
|
template <>
|
2321
|
-
struct
|
2335
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<double>
|
2322
2336
|
: public __scalar_hash<double>
|
2323
2337
|
{
|
2324
2338
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2332,7 +2346,7 @@ struct _LIBCPP_TYPE_VIS hash<double>
|
|
2332
2346
|
};
|
2333
2347
|
|
2334
2348
|
template <>
|
2335
|
-
struct
|
2349
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash<long double>
|
2336
2350
|
: public __scalar_hash<long double>
|
2337
2351
|
{
|
2338
2352
|
_LIBCPP_INLINE_VISIBILITY
|
@@ -2381,6 +2395,22 @@ struct _LIBCPP_TYPE_VIS hash<long double>
|
|
2381
2395
|
}
|
2382
2396
|
};
|
2383
2397
|
|
2398
|
+
#if _LIBCPP_STD_VER > 11
|
2399
|
+
template <class _Tp>
|
2400
|
+
struct _LIBCPP_TYPE_VIS_ONLY hash
|
2401
|
+
: public unary_function<_Tp, size_t>
|
2402
|
+
{
|
2403
|
+
static_assert(is_enum<_Tp>::value, "This hash only works for enumeration types");
|
2404
|
+
|
2405
|
+
_LIBCPP_INLINE_VISIBILITY
|
2406
|
+
size_t operator()(_Tp __v) const _NOEXCEPT
|
2407
|
+
{
|
2408
|
+
typedef typename underlying_type<_Tp>::type type;
|
2409
|
+
return hash<type>{}(static_cast<type>(__v));
|
2410
|
+
}
|
2411
|
+
};
|
2412
|
+
#endif
|
2413
|
+
|
2384
2414
|
// struct hash<T*> in <memory>
|
2385
2415
|
|
2386
2416
|
_LIBCPP_END_NAMESPACE_STD
|