Home
last modified time | relevance | path

Searched refs:strong_ordering (Results 1 – 25 of 47) sorted by relevance

12

/external/llvm-project/libcxx/test/std/language.support/cmp/cmp.strongord/
Dstrongord.pass.cpp25 DoNotOptimize(&std::strong_ordering::less); in test_static_members()
26 DoNotOptimize(&std::strong_ordering::equal); in test_static_members()
27 DoNotOptimize(&std::strong_ordering::equivalent); in test_static_members()
28 DoNotOptimize(&std::strong_ordering::greater); in test_static_members()
32 auto& Eq = std::strong_ordering::equivalent; in test_signatures()
49 ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::strong_ordering); in test_signatures()
50 ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::strong_ordering); in test_signatures()
55 static_assert(std::is_convertible<const std::strong_ordering&, in test_conversion()
58 auto V = std::strong_ordering::equivalent; in test_conversion()
62 std::strong_ordering WeakTestCases[] = { in test_conversion()
[all …]
/external/llvm-project/clang/test/CXX/class/class.compare/class.compare.default/
Dp4.cpp7 struct strong_ordering { struct
10 static const strong_ordering less, equal, greater;
12 constexpr strong_ordering strong_ordering::less = {-1};
13 constexpr strong_ordering strong_ordering::equal = {0};
14 constexpr strong_ordering strong_ordering::greater = {1};
19 friend constexpr std::strong_ordering operator<=>(const A&, const A&) = default; argument
30 virtual std::strong_ordering operator<=>(const B1&) const = default;
40 std::strong_ordering operator<=>(const B2&) const = default;
48 std::strong_ordering operator<=>(const D&) const;
49 virtual std::strong_ordering operator<=>(const struct E&) const = 0;
[all …]
Dp3.cpp6 struct strong_ordering { struct
9 static const strong_ordering less, equal, greater;
11 constexpr strong_ordering strong_ordering::less = {-1};
12 constexpr strong_ordering strong_ordering::equal = {0};
13 constexpr strong_ordering strong_ordering::greater = {1};
20 friend std::strong_ordering operator<=>(const A&, const A&) = default; argument
30 friend constexpr std::strong_ordering operator<=>(const A&, const A&) noexcept;
44 friend std::strong_ordering operator<=>(const ReversedA&, const ReversedA&) = default;
54 friend constexpr std::strong_ordering operator<=>(const ReversedA&, const ReversedA&) noexcept;
65 friend std::strong_ordering operator<=>(const B&, const B&) = default;
[all …]
Dp1.cpp51 struct strong_ordering { struct
54 static const strong_ordering equal, greater, less;
56 constexpr strong_ordering strong_ordering::equal = {0};
57 constexpr strong_ordering strong_ordering::greater = {1};
58 constexpr strong_ordering strong_ordering::less = {-1};
70 std::strong_ordering operator<=>(const B &) const = default; in f() argument
76 struct Cmp { Cmp(std::strong_ordering); }; in g()
90 std::strong_ordering operator<=>(const B&, const B&); in h()
Dp5.cpp5 struct strong_ordering { struct
8 static const strong_ordering less, equal, greater;
10 …constexpr strong_ordering strong_ordering::less{-1}, strong_ordering::equal{0}, strong_ordering::g…
24 constexpr std::strong_ordering operator<=>(const B&) const { log->add(C); return {0}; } in operator <=>() argument
43 std::strong_ordering operator<=>(const C&) const = default;
56 std::strong_ordering operator<=>(const D&) const = default;
/external/libcxx/test/std/language.support/cmp/cmp.strongord/
Dstrongord.pass.cpp26 DoNotOptimize(&std::strong_ordering::less); in test_static_members()
27 DoNotOptimize(&std::strong_ordering::equal); in test_static_members()
28 DoNotOptimize(&std::strong_ordering::equivalent); in test_static_members()
29 DoNotOptimize(&std::strong_ordering::greater); in test_static_members()
33 auto& Eq = std::strong_ordering::equivalent; in test_signatures()
50 ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::strong_ordering); in test_signatures()
51 ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::strong_ordering); in test_signatures()
56 static_assert(std::is_convertible<const std::strong_ordering&, in test_conversion()
59 auto V = std::strong_ordering::equivalent; in test_conversion()
63 std::strong_ordering WeakTestCases[] = { in test_conversion()
[all …]
/external/llvm-project/clang/test/CodeGenCXX/Inputs/
Dstd-compare.h208 class strong_ordering {
210 …explicit constexpr strong_ordering(_EqResult __v) noexcept : __value_(static_cast<signed char>(__v… in strong_ordering() function
211 …explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(static_cast<signed char>(__… in strong_ordering() function
214 static const strong_ordering less;
215 static const strong_ordering equal;
216 static const strong_ordering equivalent;
217 static const strong_ordering greater;
230 friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
231 friend constexpr bool operator!=(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
232 friend constexpr bool operator<(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
[all …]
/external/llvm-project/clang/test/SemaCXX/Inputs/
Dstd-compare.h208 class strong_ordering {
210 …explicit constexpr strong_ordering(_EqResult __v) noexcept : __value_(static_cast<signed char>(__v… in strong_ordering() function
211 …explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(static_cast<signed char>(__… in strong_ordering() function
214 static const strong_ordering less;
215 static const strong_ordering equal;
216 static const strong_ordering equivalent;
217 static const strong_ordering greater;
230 friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
231 friend constexpr bool operator!=(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
232 friend constexpr bool operator<(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
[all …]
/external/llvm-project/clang/test/PCH/Inputs/
Dstd-compare.h208 class strong_ordering {
210 …explicit constexpr strong_ordering(_EqResult __v) noexcept : __value_(static_cast<signed char>(__v… in strong_ordering() function
211 …explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(static_cast<signed char>(__… in strong_ordering() function
214 static const strong_ordering less;
215 static const strong_ordering equal;
216 static const strong_ordering equivalent;
217 static const strong_ordering greater;
230 friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
231 friend constexpr bool operator!=(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
232 friend constexpr bool operator<(strong_ordering __v, _CmpUnspecifiedParam) noexcept;
[all …]
/external/llvm-project/clang/test/CXX/class/class.compare/class.spaceship/
Dp1.cpp4 struct strong_ordering { // expected-note 6{{candidate}} struct
7 static const strong_ordering less, equal, greater; argument
9 constexpr strong_ordering strong_ordering::less{-1},
10 strong_ordering::equal{0}, strong_ordering::greater{1};
15 constexpr weak_ordering(strong_ordering o) : n(o.n) {} in weak_ordering()
25 constexpr partial_ordering(strong_ordering o) : d(o.n) {} in partial_ordering()
41 std::strong_ordering operator<=>(const A&) const;
48 std::strong_ordering operator<=>(const C&) const = delete; // expected-note 2{{deleted}}
52 …std::strong_ordering operator<=>(int) const; // expected-note 2{{function not viable}} expected-no…
57 …std::strong_ordering operator<=>(int) const; // expected-note 2{{function not viable}} expected-no…
[all …]
Dp2.cpp4 class strong_ordering { class
6 constexpr strong_ordering(int n) : n(n) {} in strong_ordering() function in std::strong_ordering
8 static const strong_ordering less, equal, greater;
11 constexpr strong_ordering strong_ordering::less{-1},
12 strong_ordering::equal{0}, strong_ordering::greater{1};
18 constexpr weak_ordering(strong_ordering o);
29 constexpr partial_ordering(strong_ordering o);
83 template void f<std::strong_ordering>();
84 template void f<std::strong_ordering, strong>();
85 template void f<std::strong_ordering, strong, strong2>();
[all …]
Dp3.cpp4 struct strong_ordering { struct
7 static const strong_ordering less, equal, greater;
9 …constexpr strong_ordering strong_ordering::less{-1}, strong_ordering::equal{0}, strong_ordering::g…
14 std::strong_ordering operator<=>(const A&) const = default; argument
26 constexpr explicit reverse_compare(std::strong_ordering o) : n(-o.n) {} in reverse_compare()
/external/llvm-project/clang/test/CodeGenCXX/
Dcxx2a-three-way-comparison.cpp5 struct strong_ordering { struct
8 static const strong_ordering less, equal, greater;
10 constexpr strong_ordering strong_ordering::less = {-1};
11 constexpr strong_ordering strong_ordering::equal = {0};
12 constexpr strong_ordering strong_ordering::greater = {1};
17 std::strong_ordering operator<=>(const Primary&) const = default; argument
22 std::strong_ordering operator<=>(const X&) const = default;
35 virtual std::strong_ordering operator<=>(const Y&) const = default;
/external/llvm-project/clang/test/CXX/except/except.spec/
Dp11-2a.cpp20 struct strong_ordering { struct
22 static const strong_ordering equal, less, greater;
24 constexpr strong_ordering strong_ordering::equal{0},
25 strong_ordering::less{-1}, strong_ordering::greater{1};
26 bool operator!=(std::strong_ordering o, int n) noexcept; argument
69 friend std::strong_ordering operator<=>(X, X);
72 friend std::strong_ordering operator<=>(Y, Y) = default;
78 ThrowingCmpCat(std::strong_ordering);
79 operator std::strong_ordering();
89 std::strong_ordering operator<=>(const B&) const = default;
[all …]
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
/external/angle/third_party/abseil-cpp/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
/external/libtextclassifier/abseil-cpp/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
/external/abseil-cpp/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
/external/webrtc/third_party/abseil-cpp/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
Dcompare.h435 class strong_ordering
436 : public compare_internal::strong_ordering_base<strong_ordering> {
437 explicit constexpr strong_ordering(compare_internal::eq v) noexcept
439 explicit constexpr strong_ordering(compare_internal::ord v) noexcept
441 friend struct compare_internal::strong_ordering_base<strong_ordering>;
444 ABSL_COMPARE_INLINE_SUBCLASS_DECL(strong_ordering, less);
445 ABSL_COMPARE_INLINE_SUBCLASS_DECL(strong_ordering, equal);
446 ABSL_COMPARE_INLINE_SUBCLASS_DECL(strong_ordering, equivalent);
447 ABSL_COMPARE_INLINE_SUBCLASS_DECL(strong_ordering, greater);
469 strong_ordering v, compare_internal::OnlyLiteralZero<>) noexcept {
[all …]
/external/openscreen/third_party/abseil/src/absl/types/
Dcompare_test.cc124 EXPECT_TRUE(Identity(strong_ordering::less < 0)); in TEST()
125 EXPECT_TRUE(Identity(0 > strong_ordering::less)); in TEST()
126 EXPECT_TRUE(Identity(strong_ordering::less <= 0)); in TEST()
127 EXPECT_TRUE(Identity(0 >= strong_ordering::less)); in TEST()
128 EXPECT_TRUE(Identity(strong_ordering::equal == 0)); in TEST()
129 EXPECT_TRUE(Identity(0 == strong_ordering::equal)); in TEST()
130 EXPECT_TRUE(Identity(strong_ordering::equivalent == 0)); in TEST()
131 EXPECT_TRUE(Identity(0 == strong_ordering::equivalent)); in TEST()
132 EXPECT_TRUE(Identity(strong_ordering::greater > 0)); in TEST()
133 EXPECT_TRUE(Identity(0 < strong_ordering::greater)); in TEST()
[all …]
/external/llvm-project/clang/test/PCH/
Dcxx2a-defaulted-comparison.cpp15 struct strong_ordering { struct
18 static const strong_ordering equal, greater, less;
20 constexpr strong_ordering strong_ordering::equal = {0};
21 constexpr strong_ordering strong_ordering::greater = {1};
22 constexpr strong_ordering strong_ordering::less = {-1};
35 std::strong_ordering operator<=>(const B &) const = default; in f() argument
/external/llvm-project/libcxx/include/
Dcompare22 class strong_ordering;
41 template<class T> constexpr strong_ordering strong_order(const T& a, const T& b);
97 // [cmp.strongord], Class strong_ordering
98 class strong_ordering {
101 static const strong_ordering less;
102 static const strong_ordering equal;
103 static const strong_ordering equivalent;
104 static const strong_ordering greater;
111 friend constexpr bool operator==(strong_ordering v, unspecified) noexcept;
112 friend constexpr bool operator==(strong_ordering v, strong_ordering w) noexcept = default;
[all …]
/external/libcxx/include/
Dcompare23 class strong_ordering;
42 template<class T> constexpr strong_ordering strong_order(const T& a, const T& b);
440 class strong_ordering {
444 explicit constexpr strong_ordering(_EqResult __v) noexcept : __value_(_ValueT(__v)) {}
446 explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}
449 static const strong_ordering less;
450 static const strong_ordering equal;
451 static const strong_ordering equivalent;
452 static const strong_ordering greater;
480 …_LIBCPP_INLINE_VISIBILITY friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedPar…
[all …]
/external/llvm-project/clang/test/SemaCXX/
Dstd-compare-cxx2a.cpp52 struct strong_ordering { struct
54 static const strong_ordering equal; // expected-note {{declared here}} argument
68 struct strong_ordering { struct
70 constexpr strong_ordering() = default;
72 constexpr strong_ordering(strong_ordering const &other) : value(other.value) {} in strong_ordering() argument

12