Skip to content

Commit 046b20b

Browse files
committed
Cleanup
1 parent c41d7c9 commit 046b20b

File tree

15 files changed

+71
-82
lines changed

15 files changed

+71
-82
lines changed

libcxx/include/version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ __cpp_lib_constexpr_tuple 201811L <tuple>
8282
__cpp_lib_constexpr_typeinfo 202106L <typeinfo>
8383
__cpp_lib_constexpr_utility 201811L <utility>
8484
__cpp_lib_constexpr_vector 201907L <vector>
85-
__cpp_lib_constrained_equality 202411L <expected> <optional> <tuple>
86-
<utility> <variant>
85+
__cpp_lib_constrained_equality 202403L <optional> <tuple> <utility>
86+
<variant>
8787
__cpp_lib_containers_ranges 202202L <deque> <forward_list> <list>
8888
<map> <queue> <set>
8989
<stack> <string> <unordered_map>

libcxx/test/std/language.support/support.limits/support.limits.general/expected.version.compile.pass.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020

2121
#if TEST_STD_VER < 14
2222

23-
# ifdef __cpp_lib_constrained_equality
24-
# error "__cpp_lib_constrained_equality should not be defined before c++26"
25-
# endif
26-
2723
# ifdef __cpp_lib_expected
2824
# error "__cpp_lib_expected should not be defined before c++23"
2925
# endif
@@ -34,10 +30,6 @@
3430

3531
#elif TEST_STD_VER == 14
3632

37-
# ifdef __cpp_lib_constrained_equality
38-
# error "__cpp_lib_constrained_equality should not be defined before c++26"
39-
# endif
40-
4133
# ifdef __cpp_lib_expected
4234
# error "__cpp_lib_expected should not be defined before c++23"
4335
# endif
@@ -48,10 +40,6 @@
4840

4941
#elif TEST_STD_VER == 17
5042

51-
# ifdef __cpp_lib_constrained_equality
52-
# error "__cpp_lib_constrained_equality should not be defined before c++26"
53-
# endif
54-
5543
# ifdef __cpp_lib_expected
5644
# error "__cpp_lib_expected should not be defined before c++23"
5745
# endif
@@ -62,10 +50,6 @@
6250

6351
#elif TEST_STD_VER == 20
6452

65-
# ifdef __cpp_lib_constrained_equality
66-
# error "__cpp_lib_constrained_equality should not be defined before c++26"
67-
# endif
68-
6953
# ifdef __cpp_lib_expected
7054
# error "__cpp_lib_expected should not be defined before c++23"
7155
# endif
@@ -76,10 +60,6 @@
7660

7761
#elif TEST_STD_VER == 23
7862

79-
# ifdef __cpp_lib_constrained_equality
80-
# error "__cpp_lib_constrained_equality should not be defined before c++26"
81-
# endif
82-
8363
# ifndef __cpp_lib_expected
8464
# error "__cpp_lib_expected should be defined in c++23"
8565
# endif
@@ -93,19 +73,6 @@
9373

9474
#elif TEST_STD_VER > 23
9575

96-
# if !defined(_LIBCPP_VERSION)
97-
# ifndef __cpp_lib_constrained_equality
98-
# error "__cpp_lib_constrained_equality should be defined in c++26"
99-
# endif
100-
# if __cpp_lib_constrained_equality != 202411L
101-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
102-
# endif
103-
# else
104-
# ifdef __cpp_lib_constrained_equality
105-
# error "__cpp_lib_constrained_equality should not be defined because it is unimplemented in libc++!"
106-
# endif
107-
# endif
108-
10976
# ifndef __cpp_lib_expected
11077
# error "__cpp_lib_expected should be defined in c++26"
11178
# endif

libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@
123123
# ifndef __cpp_lib_constrained_equality
124124
# error "__cpp_lib_constrained_equality should be defined in c++26"
125125
# endif
126-
# if __cpp_lib_constrained_equality != 202411L
127-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
126+
# if __cpp_lib_constrained_equality != 202403L
127+
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
128128
# endif
129129
# else
130130
# ifdef __cpp_lib_constrained_equality

libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@
274274
# ifndef __cpp_lib_constrained_equality
275275
# error "__cpp_lib_constrained_equality should be defined in c++26"
276276
# endif
277-
# if __cpp_lib_constrained_equality != 202411L
278-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
277+
# if __cpp_lib_constrained_equality != 202403L
278+
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
279279
# endif
280280
# else
281281
# ifdef __cpp_lib_constrained_equality

libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@
405405
# ifndef __cpp_lib_constrained_equality
406406
# error "__cpp_lib_constrained_equality should be defined in c++26"
407407
# endif
408-
# if __cpp_lib_constrained_equality != 202411L
409-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
408+
# if __cpp_lib_constrained_equality != 202403L
409+
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
410410
# endif
411411
# else
412412
# ifdef __cpp_lib_constrained_equality

libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.compile.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
# ifndef __cpp_lib_constrained_equality
104104
# error "__cpp_lib_constrained_equality should be defined in c++26"
105105
# endif
106-
# if __cpp_lib_constrained_equality != 202411L
107-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
106+
# if __cpp_lib_constrained_equality != 202403L
107+
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
108108
# endif
109109
# else
110110
# ifdef __cpp_lib_constrained_equality

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6548,8 +6548,8 @@
65486548
# ifndef __cpp_lib_constrained_equality
65496549
# error "__cpp_lib_constrained_equality should be defined in c++26"
65506550
# endif
6551-
# if __cpp_lib_constrained_equality != 202411L
6552-
# error "__cpp_lib_constrained_equality should have the value 202411L in c++26"
6551+
# if __cpp_lib_constrained_equality != 202403L
6552+
# error "__cpp_lib_constrained_equality should have the value 202403L in c++26"
65536553
# endif
65546554
# else
65556555
# ifdef __cpp_lib_constrained_equality

libcxx/test/std/utilities/expected/expected.expected/equality/equality.T2.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
#include <type_traits>
1717
#include <utility>
1818

19-
#include "test_comparisons.h"
2019
#include "test_macros.h"
20+
#include "../../types.h"
2121

2222
#if TEST_STD_VER >= 26
2323
// https://wg21.link/P3379R0
24-
static_assert(HasOperatorEqual<std::expected<int, int>, int>);
25-
static_assert(HasOperatorEqual<std::expected<int, int>, EqualityComparable>);
26-
static_assert(!HasOperatorEqual<std::expected<int, int>, NonComparable>);
24+
static_assert(CanCompare<std::expected<int, int>, int>);
25+
static_assert(CanCompare<std::expected<int, int>, EqualityComparable>);
26+
static_assert(!CanCompare<std::expected<int, int>, NonComparable>);
2727
#endif
2828

2929
constexpr bool test() {

libcxx/test/std/utilities/expected/expected.expected/equality/equality.other_expected.pass.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@
1717
#include <type_traits>
1818
#include <utility>
1919

20-
#include "test_comparisons.h"
2120
#include "test_macros.h"
21+
#include "../../types.h"
2222

2323
// Test constraint
24-
static_assert(!HasOperatorEqual<NonComparable, NonComparable>);
24+
static_assert(!CanCompare<NonComparable, NonComparable>);
2525

26-
static_assert(HasOperatorEqual<std::expected<int, int>, std::expected<int, int>>);
27-
static_assert(HasOperatorEqual<std::expected<int, int>, std::expected<short, short>>);
26+
static_assert(CanCompare<std::expected<int, int>, std::expected<int, int>>);
27+
static_assert(CanCompare<std::expected<int, int>, std::expected<short, short>>);
2828

2929
#if TEST_STD_VER >= 26
3030
// https://wg21.link/P3379R0
31-
static_assert(!HasOperatorEqual<std::expected<int, int>, std::expected<void, int>>);
32-
static_assert(HasOperatorEqual<std::expected<int, int>, std::expected<int, int>>);
33-
static_assert(!HasOperatorEqual<std::expected<NonComparable, int>, std::expected<NonComparable, int>>);
34-
static_assert(!HasOperatorEqual<std::expected<int, NonComparable>, std::expected<int, NonComparable>>);
35-
static_assert(!HasOperatorEqual<std::expected<NonComparable, int>, std::expected<int, NonComparable>>);
36-
static_assert(!HasOperatorEqual<std::expected<int, NonComparable>, std::expected<NonComparable, int>>);
31+
static_assert(!CanCompare<std::expected<int, int>, std::expected<void, int>>);
32+
static_assert(CanCompare<std::expected<int, int>, std::expected<int, int>>);
33+
static_assert(!CanCompare<std::expected<NonComparable, int>, std::expected<NonComparable, int>>);
34+
static_assert(!CanCompare<std::expected<int, NonComparable>, std::expected<int, NonComparable>>);
35+
static_assert(!CanCompare<std::expected<NonComparable, int>, std::expected<int, NonComparable>>);
36+
static_assert(!CanCompare<std::expected<int, NonComparable>, std::expected<NonComparable, int>>);
3737
#else
3838
// Note this is true because other overloads in expected<non-void> are unconstrained
39-
static_assert(HasOperatorEqual<std::expected<void, int>, std::expected<int, int>>);
39+
static_assert(CanCompare<std::expected<void, int>, std::expected<int, int>>);
4040
#endif
4141
constexpr bool test() {
4242
// x.has_value() && y.has_value()

libcxx/test/std/utilities/expected/expected.expected/equality/equality.unexpected.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <type_traits>
1717
#include <utility>
1818

19-
#include "test_comparisons.h"
2019
#include "test_macros.h"
2120

2221
#if TEST_STD_VER >= 26

0 commit comments

Comments
 (0)