| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/cmp.partialord/ |
| H A D | partialord.pass.cpp | 25 DoNotOptimize(&std::partial_ordering::less); in test_static_members() 27 DoNotOptimize(&std::partial_ordering::greater); in test_static_members() 28 DoNotOptimize(&std::partial_ordering::unordered); in test_static_members() 32 auto& Eq = std::partial_ordering::equivalent; in test_signatures() 66 auto& Eq = std::partial_ordering::equivalent; in test_constexpr() 67 auto& Less = std::partial_ordering::less; in test_constexpr() 71 std::partial_ordering Value; in test_constexpr() 101 std::partial_ordering res = (Eq <=> 0); in test_constexpr() 113 std::partial_ordering Value; in test_constexpr() 117 {std::partial_ordering::less, ER_Less}, in test_constexpr() [all …]
|
| /llvm-project-15.0.7/clang/test/SemaCXX/Inputs/ |
| H A D | std-compare.h | 25 class partial_ordering { 40 static const partial_ordering less; 71 inline constexpr partial_ordering partial_ordering::less(_OrdResult::__less); 72 inline constexpr partial_ordering partial_ordering::equivalent(_EqResult::__equiv); 73 inline constexpr partial_ordering partial_ordering::greater(_OrdResult::__greater); 74 inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__unordered); 112 constexpr partial_ordering operator<=>(partial_ordering __v, _CmpUnspecifiedParam) noexcept { 115 constexpr partial_ordering operator<=>(_CmpUnspecifiedParam, partial_ordering __v) noexcept { 116 return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v); 132 : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater); in partial_ordering() [all …]
|
| /llvm-project-15.0.7/clang/test/PCH/Inputs/ |
| H A D | std-compare.h | 25 class partial_ordering { 40 static const partial_ordering less; 71 inline constexpr partial_ordering partial_ordering::less(_OrdResult::__less); 72 inline constexpr partial_ordering partial_ordering::equivalent(_EqResult::__equiv); 73 inline constexpr partial_ordering partial_ordering::greater(_OrdResult::__greater); 74 inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__unordered); 112 constexpr partial_ordering operator<=>(partial_ordering __v, _CmpUnspecifiedParam) noexcept { 115 constexpr partial_ordering operator<=>(_CmpUnspecifiedParam, partial_ordering __v) noexcept { 116 return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v); 132 : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater); in partial_ordering() [all …]
|
| /llvm-project-15.0.7/clang/test/CodeGenCXX/Inputs/ |
| H A D | std-compare.h | 25 class partial_ordering { 40 static const partial_ordering less; 71 inline constexpr partial_ordering partial_ordering::less(_OrdResult::__less); 72 inline constexpr partial_ordering partial_ordering::equivalent(_EqResult::__equiv); 73 inline constexpr partial_ordering partial_ordering::greater(_OrdResult::__greater); 74 inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__unordered); 112 constexpr partial_ordering operator<=>(partial_ordering __v, _CmpUnspecifiedParam) noexcept { 115 constexpr partial_ordering operator<=>(_CmpUnspecifiedParam, partial_ordering __v) noexcept { 116 return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v); 132 : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater); in partial_ordering() [all …]
|
| /llvm-project-15.0.7/libcxx/include/__compare/ |
| H A D | ordering.h | 34 class partial_ordering; variable 49 class partial_ordering { 66 static const partial_ordering less; 73 friend constexpr bool operator==(partial_ordering, partial_ordering) noexcept = default; 127 return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v); 133 inline constexpr partial_ordering partial_ordering::less(_OrdResult::__less); 134 inline constexpr partial_ordering partial_ordering::equivalent(_OrdResult::__equiv); 135 inline constexpr partial_ordering partial_ordering::greater(_OrdResult::__greater); 136 inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__unordered); 152 : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater); in partial_ordering() [all …]
|
| H A D | compare_partial_order_fallback.h | 42 …cept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent : 43 … _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less : 44 … _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater : 45 partial_ordering::unordered)) 46 …ecltype( _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent : 47 … _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less : 48 … _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater : 49 partial_ordering::unordered) 52 … _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less : 53 … _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater : [all …]
|
| H A D | is_eq.h | 23 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_eq(partial_ordering __c) noexcept { return __c == 0;… in is_eq() 24 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_neq(partial_ordering __c) noexcept { return __c != 0… in is_neq() 25 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lt(partial_ordering __c) noexcept { return __c < 0; } in is_lt() 26 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lteq(partial_ordering __c) noexcept { return __c <= … in is_lteq() 27 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gt(partial_ordering __c) noexcept { return __c > 0; } in is_gt() 28 _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gteq(partial_ordering __c) noexcept { return __c >= … in is_gteq()
|
| H A D | partial_order.h | 35 …noexcept(noexcept(partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u… 36 …-> decltype( partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u… 37 …{ return partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u… 43 …noexcept(noexcept(partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_U… 44 …-> decltype( partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_U… 45 …{ return partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_U… 51 …noexcept(noexcept(partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>… 52 …-> decltype( partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>… 53 …{ return partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>…
|
| H A D | weak_order.h | 45 partial_ordering __po = (__t <=> __u); in __go() 46 if (__po == partial_ordering::less) { in __go() 48 } else if (__po == partial_ordering::equivalent) { in __go() 50 } else if (__po == partial_ordering::greater) { in __go()
|
| H A D | three_way_comparable.h | 33 template<class _Tp, class _Cat = partial_ordering> 41 template<class _Tp, class _Up, class _Cat = partial_ordering>
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/compare.syn/ |
| H A D | named_functions.pass.cpp | 33 assert(!std::is_eq(std::partial_ordering::less)); in test() 35 assert(!std::is_eq(std::partial_ordering::greater)); in test() 36 assert(!std::is_eq(std::partial_ordering::unordered)); in test() 44 assert( std::is_neq(std::partial_ordering::less)); in test() 46 assert( std::is_neq(std::partial_ordering::greater)); in test() 55 assert( std::is_lt(std::partial_ordering::less)); in test() 57 assert(!std::is_lt(std::partial_ordering::greater)); in test() 66 assert( std::is_lteq(std::partial_ordering::less)); in test() 77 assert(!std::is_gt(std::partial_ordering::less)); in test() 79 assert( std::is_gt(std::partial_ordering::greater)); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/cmp.alg/ |
| H A D | partial_order.pass.cpp | 75 explicit operator std::partial_ordering() const { return std::partial_ordering::less; } in operator std::partial_ordering() 100 assert(std::partial_order(c1, c2) == std::partial_ordering::less); in test_1_2() 109 constexpr std::partial_ordering operator<=>(A&, A&&) { return std::partial_ordering::less; } in operator <=>() 110 …constexpr std::partial_ordering operator<=>(A&&, A&&) { return std::partial_ordering::equivalent; } in operator <=>() 111 std::partial_ordering operator<=>(const A&, const A&); 122 constexpr std::partial_ordering operator<=>(const C& rhs) const { in operator <=>() 124 return std::partial_ordering::equivalent; in operator <=>() 147 assert(std::partial_order(c1, c2) == std::partial_ordering::equivalent); in test_1_3() 194 friend std::partial_ordering weak_order(B, B); 206 operator std::partial_ordering() const = delete; [all …]
|
| H A D | compare_partial_order_fallback.pass.cpp | 75 explicit operator std::partial_ordering() const { return std::partial_ordering::less; } in operator std::partial_ordering() 100 assert(std::partial_order(c1, c2) == std::partial_ordering::less); in test_1_2() 109 constexpr std::partial_ordering operator<=>(A&, A&&) { return std::partial_ordering::less; } in operator <=>() 110 …constexpr std::partial_ordering operator<=>(A&&, A&&) { return std::partial_ordering::equivalent; } in operator <=>() 111 std::partial_ordering operator<=>(const A&, const A&); 115 std::partial_ordering operator<=>(const B&) const; // lacks operator== 122 constexpr std::partial_ordering operator<=>(const C& rhs) const { in operator <=>() 124 return std::partial_ordering::equivalent; in operator <=>() 194 friend std::partial_ordering weak_order(B, B); 206 operator std::partial_ordering() const = delete; [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/ |
| H A D | three_way.pass.cpp | 81 ASSERT_SAME_TYPE(decltype(T1() <=> T2()), std::partial_ordering); in test() 82 assert((T1(1) <=> T2(1)) == std::partial_ordering::equivalent); in test() 83 assert((T1(1) <=> T2(0.9)) == std::partial_ordering::greater); in test() 84 assert((T1(1) <=> T2(1.1)) == std::partial_ordering::less); in test() 89 ASSERT_SAME_TYPE(decltype(T1() <=> T2()), std::partial_ordering); in test() 91 assert((T1(1, 2) <=> T2(0.9, 2)) == std::partial_ordering::greater); in test() 92 assert((T1(1, 2) <=> T2(1.1, 2)) == std::partial_ordering::less); in test() 93 assert((T1(1, 2) <=> T2(1, 1)) == std::partial_ordering::greater); in test() 94 assert((T1(1, 2) <=> T2(1, 3)) == std::partial_ordering::less); in test() 99 ASSERT_SAME_TYPE(decltype(T1() <=> T2()), std::partial_ordering); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/include/ |
| H A D | compare | 18 class partial_ordering; 39 template<class T, class Cat = partial_ordering> 63 // [cmp.partialord], Class partial_ordering 64 class partial_ordering { 67 static const partial_ordering less; 68 static const partial_ordering equivalent; 69 static const partial_ordering greater; 70 static const partial_ordering unordered; 74 friend constexpr bool operator==(partial_ordering v, partial_ordering w) noexcept = default; 83 friend constexpr partial_ordering operator<=>(partial_ordering v, unspecified) noexcept; [all …]
|
| /llvm-project-15.0.7/clang/test/CXX/class/class.compare/class.spaceship/ |
| H A D | p2.cpp | 25 class partial_ordering { class 27 constexpr partial_ordering(int n) : n(n) {} in partial_ordering() function in std::partial_ordering 29 constexpr partial_ordering(strong_ordering o); 30 constexpr partial_ordering(weak_ordering o); 34 constexpr partial_ordering partial_ordering::less{-1}, 35 partial_ordering::equivalent{0}, partial_ordering::greater{1}, 36 partial_ordering::unordered{2}; 91 template void f<std::partial_ordering, partial>(); 92 template void f<std::partial_ordering, weak, partial>(); 94 template void f<std::partial_ordering, partial, weak>(); [all …]
|
| H A D | p1.cpp | 22 struct partial_ordering { struct 24 constexpr partial_ordering(double d) : d(d) {} in partial_ordering() argument 25 constexpr partial_ordering(strong_ordering o) : d(o.n) {} in partial_ordering() function 26 constexpr partial_ordering(weak_ordering o) : d(o.n) {} in partial_ordering() function 30 constexpr partial_ordering partial_ordering::less{-1}, 31 partial_ordering::equivalent{0}, partial_ordering::greater{1}, 32 partial_ordering::unordered{__builtin_nan("")}; 34 static_assert(!(partial_ordering::unordered < 0)); 35 static_assert(!(partial_ordering::unordered == 0)); 36 static_assert(!(partial_ordering::unordered > 0)); [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/utility/pairs/pairs.spec/ |
| H A D | three_way_comparison.pass.cpp | 55 ASSERT_SAME_TYPE(decltype(P() <=> P()), std::partial_ordering); in test() 56 assert((P(1, 1.0) <=> P(1, 2.0)) == std::partial_ordering::less); in test() 57 assert((P(1, 1.0) <=> P(1, 1.0)) == std::partial_ordering::equivalent); in test() 59 assert((P(1, 2.0) <=> P(1, 1.0)) == std::partial_ordering::greater); in test() 60 assert((P(1, nan) <=> P(2, nan)) == std::partial_ordering::less); in test() 61 assert((P(2, nan) <=> P(1, nan)) == std::partial_ordering::greater); in test() 62 assert((P(1, nan) <=> P(1, nan)) == std::partial_ordering::unordered); in test() 67 ASSERT_SAME_TYPE(decltype(P() <=> P()), std::partial_ordering); in test() 68 assert((P(2.0, 1) <=> P(1.0, 2)) == std::partial_ordering::greater); in test() 69 assert((P(1.0, 1) <=> P(1.0, 2)) == std::partial_ordering::less); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/library/description/conventions/expos.only.func/ |
| H A D | synth_three_way.pass.cpp | 54 assert(synth_three_way(1.0, 1.0) == std::partial_ordering::equivalent); in test() 55 assert(synth_three_way(2.0, 1.0) == std::partial_ordering::greater); in test() 56 assert(synth_three_way(1.0, 2.0) == std::partial_ordering::less); in test() 57 assert(synth_three_way(nan, nan) == std::partial_ordering::unordered); in test() 58 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, double>); in test() 59 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, float>); in test() 60 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, int>); in test() 61 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<float, short>); in test() 91 constexpr std::partial_ordering operator<=>(const PartialSpaceship& other) const { in test() 100 …ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<PartialSpaceship, PartialSpaceship>… in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/function.objects/comparisons/ |
| H A D | compare_three_way.pass.cpp | 54 ASSERT_SAME_TYPE(decltype(std::compare_three_way()(1.0, 1.0)), std::partial_ordering); in test() 56 assert(std::compare_three_way()(1.0, 2.0) == std::partial_ordering::less); in test() 57 assert(std::compare_three_way()(1.0, 1.0) == std::partial_ordering::equivalent); in test() 58 assert(std::compare_three_way()(2.0, 1.0) == std::partial_ordering::greater); in test() 59 assert(std::compare_three_way()(nan, nan) == std::partial_ordering::unordered); in test() 62 ASSERT_SAME_TYPE(decltype(std::compare_three_way()(42.0, 42)), std::partial_ordering); in test() 63 assert(std::compare_three_way()(42.0, 42) == std::partial_ordering::equivalent); in test() 64 ASSERT_SAME_TYPE(decltype(std::compare_three_way()(42, 42.0)), std::partial_ordering); in test() 65 assert(std::compare_three_way()(42, 42.0) == std::partial_ordering::equivalent); in test()
|
| /llvm-project-15.0.7/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/ |
| H A D | three-way.pass.cpp | 48 friend constexpr std::partial_ordering operator<=>(const Iter& l, const Iter& r) = default; 65 …friend constexpr std::partial_ordering operator<=>(const ConstIter& l, const ConstIter& r) = defau… 90 test(Iter(0), ConstIter(nan), std::partial_ordering::unordered); in tests() 91 test(Iter(nan), Iter(nan), std::partial_ordering::unordered); in tests() 92 test(ConstIter(0), Iter(1), std::partial_ordering::greater); in tests() 93 test(ConstIter(3), Iter(2), std::partial_ordering::less); in tests() 94 test(ConstIter(7), Iter(7), std::partial_ordering::equivalent); in tests()
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/cmp.result/ |
| H A D | compare_three_way_result.compile.pass.cpp | 25 ASSERT_SAME_TYPE(std::compare_three_way_result_t<float>, std::partial_ordering); 29 ASSERT_SAME_TYPE(std::compare_three_way_result_t<int, float>, std::partial_ordering); 30 ASSERT_SAME_TYPE(std::compare_three_way_result_t<float, int>, std::partial_ordering); 31 ASSERT_SAME_TYPE(std::compare_three_way_result_t<float, float>, std::partial_ordering); 32 ASSERT_SAME_TYPE(std::compare_three_way_result_t<float, unsigned>, std::partial_ordering); 33 ASSERT_SAME_TYPE(std::compare_three_way_result_t<unsigned, float>, std::partial_ordering);
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/cmp.weakord/ |
| H A D | weakord.pass.cpp | 55 std::partial_ordering>::value, ""); in test_conversion() 58 std::partial_ordering WV = V; in test_conversion() 63 std::partial_ordering WV = V; in test_conversion() 68 std::partial_ordering WV = V; in test_conversion() 77 auto& PartialEq = std::partial_ordering::equivalent; in test_equality()
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/cmp/cmp.strongord/ |
| H A D | strongord.pass.cpp | 57 auto& PartialEq = std::partial_ordering::equivalent; in test_equality() 67 std::partial_ordering>::value, ""); in test_conversion() 70 std::partial_ordering WV = V; in test_conversion() 75 std::partial_ordering WV = V; in test_conversion() 80 std::partial_ordering WV = V; in test_conversion()
|
| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | std-compare-cxx2a.cpp | 28 struct partial_ordering; // expected-note {{forward declaration}} 39 struct partial_ordering { struct
|