/llvm-project/libcxx/test/std/language.support/cmp/cmp.partialord/ |
H A D | partialord.pass.cpp | 25 DoNotOptimize(&std::partial_ordering::less); in test_static_members() 26 DoNotOptimize(&std::partial_ordering::equivalent); 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() 48 ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::partial_ordering); in test_signatures() 49 ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::partial_ordering); in test_signatures() 53 auto& PartialEq = std::partial_ordering::equivalent; in test_equality() 62 auto& Eq = std::partial_ordering::equivalent; in test_constexpr() 63 auto& Less = std::partial_ordering::less; in test_constexpr() [all …]
|
/llvm-project/clang/test/PCH/Inputs/ |
H A D | std-compare.h | 25 class partial_ordering { 27 explicit constexpr partial_ordering(_EqResult __v) noexcept in partial_ordering() function 29 explicit constexpr partial_ordering(_OrdResult __v) noexcept in partial_ordering() function 31 explicit constexpr partial_ordering(_NCmpResult __v) noexcept in partial_ordering() function 40 static const partial_ordering less; 41 static const partial_ordering equivalent; 42 static const partial_ordering greater; 43 static const partial_ordering unordered; 46 friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept; 47 friend constexpr bool operator!=(partial_ordering __v, _CmpUnspecifiedParam) noexcept; [all …]
|
/llvm-project/clang/test/CodeGenCXX/Inputs/ |
H A D | std-compare.h | 25 class partial_ordering { 27 explicit constexpr partial_ordering(_EqResult __v) noexcept in partial_ordering() function 29 explicit constexpr partial_ordering(_OrdResult __v) noexcept in partial_ordering() function 31 explicit constexpr partial_ordering(_NCmpResult __v) noexcept in partial_ordering() function 40 static const partial_ordering less; 41 static const partial_ordering equivalent; 42 static const partial_ordering greater; 43 static const partial_ordering unordered; 46 friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept; 47 friend constexpr bool operator!=(partial_ordering __v, _CmpUnspecifiedParam) noexcept; [all …]
|
/llvm-project/clang/test/ASTMerge/cxx-rewritten-binary-operator/Inputs/ |
H A D | std-compare.h | 25 class partial_ordering { 27 explicit constexpr partial_ordering(_EqResult __v) noexcept in partial_ordering() function 29 explicit constexpr partial_ordering(_OrdResult __v) noexcept in partial_ordering() function 31 explicit constexpr partial_ordering(_NCmpResult __v) noexcept in partial_ordering() function 40 static const partial_ordering less; 41 static const partial_ordering equivalent; 42 static const partial_ordering greater; 43 static const partial_ordering unordered; 46 friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept; 47 friend constexpr bool operator!=(partial_ordering __v, _CmpUnspecifiedParam) noexcept; [all …]
|
/llvm-project/clang/test/SemaCXX/Inputs/ |
H A D | std-compare.h | 25 class partial_ordering { 27 explicit constexpr partial_ordering(_EqResult __v) noexcept in partial_ordering() function 29 explicit constexpr partial_ordering(_OrdResult __v) noexcept in partial_ordering() function 31 explicit constexpr partial_ordering(_NCmpResult __v) noexcept in partial_ordering() function 40 static const partial_ordering less; 41 static const partial_ordering equivalent; 42 static const partial_ordering greater; 43 static const partial_ordering unordered; 46 friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept; 47 friend constexpr bool operator!=(partial_ordering __v, _CmpUnspecifiedParam) noexcept; [all …]
|
/llvm-project/libcxx/include/__compare/ |
H A D | ordering.h | 34 class partial_ordering; 54 class partial_ordering { 55 _LIBCPP_HIDE_FROM_ABI explicit constexpr partial_ordering(_PartialOrdResult __v) noexcept : __value_(__v) {} 59 static const partial_ordering less; 60 static const partial_ordering equivalent; 61 static const partial_ordering greater; 62 static const partial_ordering unordered; 65 _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(partial_ordering, partial_ordering) noexcept = default; 67 _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(partial_ordering __ 29 class partial_ordering; global() variable 46 _LIBCPP_HIDE_FROM_ABI explicit constexpr partial_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {} partial_ordering() function 48 _LIBCPP_HIDE_FROM_ABI explicit constexpr partial_ordering(_NCmpResult __v) noexcept : __value_(_ValueT(__v)) {} partial_ordering() function 129 _LIBCPP_HIDE_FROM_ABI constexpr operator partial_ordering() const noexcept { partial_ordering() function 201 _LIBCPP_HIDE_FROM_ABI constexpr operator partial_ordering() const noexcept { partial_ordering() function [all...] |
H A D | compare_partial_order_fallback.h | 46 _LIBCPP_HIDE_FROM_ABI static constexpr partial_ordering __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept( 47 noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent 48 : std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less 49 : std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater 50 : partial_ordering::unordered)) { 51 return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent 52 : std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less 54 ? partial_ordering::greater 55 : partial_ordering::unordered;
|
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 | 38 noexcept(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) 39 -> decltype(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) { 40 return partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); 47 … noexcept(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) 48 …-> decltype(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))… 49 return partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); 55 noexcept(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) 56 … -> decltype(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) { 57 return partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
|
/llvm-project/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() 34 assert( std::is_eq(std::partial_ordering::equivalent)); 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() 45 assert(!std::is_neq(std::partial_ordering::equivalent)); in test() 46 assert( std::is_neq(std::partial_ordering::greater)); in test() 47 assert( std::is_neq(std::partial_ordering::unordered)); in test() 55 assert( std::is_lt(std::partial_ordering::less)); in test() 56 assert(!std::is_lt(std::partial_ordering::equivalent)); in test() [all …]
|
/llvm-project/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() 91 assert(std::partial_order(a, std::move(a)) == std::partial_ordering::less); in test_1_2() 92 assert(std::partial_order(std::move(a), std::move(a)) == std::partial_ordering::equivalent); in test_1_2() 99 ASSERT_SAME_TYPE(decltype(std::partial_order(c1, c2)), std::partial_ordering); in test_1_2() 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 <=>() [all …]
|
H A D | compare_partial_order_fallback.pass.cpp | 13 // template<class T> constexpr partial_ordering compare_partial_order_fallback(const T& a, const T& b); 75 explicit operator std::partial_ordering() const { return std::partial_ordering::less; } in operator std::partial_ordering() 85 // Otherwise, partial_ordering(partial_order(E, F)) in test_1_2() 91 assert(std::compare_partial_order_fallback(a, std::move(a)) == std::partial_ordering::less); in test_1_2() 92 assert(std::compare_partial_order_fallback(std::move(a), std::move(a)) == std::partial_ordering::equivalent); in test_1_2() 94 // The type of partial_order(e,f) must be explicitly convertible to partial_ordering. in test_1_2() 99 ASSERT_SAME_TYPE(decltype(std::compare_partial_order_fallback(c1, c2)), std::partial_ordering); in test_1_2() 100 assert(std::partial_order(c1, c2) == std::partial_ordering::less); in test_1_2() 109 constexpr std::partial_ordering operato [all...] |
/llvm-project/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() 90 assert((T1(1, 2) <=> T2(1, 2)) == std::partial_ordering::equivalent); 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() [all …]
|
/llvm-project/libcxx/include/ |
H A D | compare | 18 class partial_ordering; 23 constexpr bool is_eq (partial_ordering cmp) noexcept { return cmp == 0; } 24 constexpr bool is_neq (partial_ordering cmp) noexcept { return cmp != 0; } 25 constexpr bool is_lt (partial_ordering cmp) noexcept { return cmp < 0; } 26 constexpr bool is_lteq(partial_ordering cmp) noexcept { return cmp <= 0; } 27 constexpr bool is_gt (partial_ordering cmp) noexcept { return cmp > 0; } 28 constexpr bool is_gteq(partial_ordering cmp) noexcept { return cmp >= 0; } 39 template<class T, class Cat = partial_ordering> 41 template<class T, class U, class Cat = partial_ordering> 63 // [cmp.partialord], Class partial_ordering [all...] |
/llvm-project/libcxx/test/std/utilities/utility/pairs/pairs.spec/ |
H A D | three_way_comparison.pass.cpp | 49 ASSERT_SAME_TYPE(decltype(P1() <=> P2()), std::partial_ordering); in test() 50 assert((P1(1, 1) <=> P2(1.0, 2.0)) == std::partial_ordering::less); in test() 51 assert((P1(2, 1) <=> P2(1.0, 2.0)) == std::partial_ordering::greater); in test() 52 assert((P1(0, 0) <=> P2(0.0, 0.0)) == std::partial_ordering::equivalent); in test() 80 ASSERT_SAME_TYPE(decltype(P() <=> P()), std::partial_ordering); in test() 81 assert((P(1, 1.0) <=> P(1, 2.0)) == std::partial_ordering::less); in test() 82 assert((P(1, 1.0) <=> P(1, 1.0)) == std::partial_ordering::equivalent); in test() 83 assert((P(1, -0.0) <=> P(1, 0.0)) == std::partial_ordering::equivalent); in test() 84 assert((P(1, 2.0) <=> P(1, 1.0)) == std::partial_ordering::greater); in test() 85 assert((P(1, nan) <=> P(2, nan)) == std::partial_ordering::less); in test() [all …]
|
/llvm-project/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); 31 static const partial_ordering less, equivalent, greater, unordered; 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>(); [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() argument 26 constexpr partial_ordering(weak_ordering o) : d(o.n) {} in partial_ordering() argument 28 static const partial_ordering less, equivalent, greater, unordered; argument 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)); [all …]
|
/llvm-project/clang/test/AST/Interp/ |
H A D | spaceship.cpp |
|
H A D | cxx20.cpp |
|
/llvm-project/libcxx/test/std/library/description/conventions/expos.only.func/ |
H A D | synth_three_way.pass.cpp | 55 assert(synth_three_way(1.0, 1.0) == std::partial_ordering::equivalent); in test() 56 assert(synth_three_way(2.0, 1.0) == std::partial_ordering::greater); in test() 57 assert(synth_three_way(1.0, 2.0) == std::partial_ordering::less); in test() 58 assert(synth_three_way(nan, nan) == std::partial_ordering::unordered); in test() 59 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, double>); in test() 60 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, float>); in test() 61 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<double, int>); in test() 62 ASSERT_SAME_TYPE(std::partial_ordering, synth_three_way_result<float, short>); in test() 92 constexpr std::partial_ordering operator<=>(const PartialSpaceship& other) const { in test() 97 …assert(synth_three_way(PartialSpaceship{1.0}, PartialSpaceship{1.0}) == std::partial_ordering::equ… in test() [all …]
|
/llvm-project/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/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/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/libcxx/test/std/language.support/cmp/cmp.weakord/ |
H A D | weakord.pass.cpp | 53 std::partial_ordering>::value, ""); in test_conversion() 56 std::partial_ordering WV = V; in test_conversion() 61 std::partial_ordering WV = V; in test_conversion() 66 std::partial_ordering WV = V; in test_conversion() 74 auto& PartialEq = std::partial_ordering::equivalent; in test_equality()
|
/llvm-project/libcxx/test/std/language.support/cmp/cmp.strongord/ |
H A D | strongord.pass.cpp | 54 auto& PartialEq = std::partial_ordering::equivalent; in test_equality() 63 std::partial_ordering>::value, ""); in test_conversion() 66 std::partial_ordering WV = V; in test_conversion() 71 std::partial_ordering WV = V; in test_conversion() 76 std::partial_ordering WV = V; in test_conversion()
|