Skip to content

Commit e307e50

Browse files
committed
Implement P2404 as a DR rather than only in 23
1 parent a065d74 commit e307e50

File tree

10 files changed

+0
-52
lines changed

10 files changed

+0
-52
lines changed

libcxx/include/__concepts/comparison_common_type.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2424

2525
#if _LIBCPP_STD_VER >= 20
2626

27-
# if _LIBCPP_STD_VER < 23
28-
29-
template <class _Tp, class _Up>
30-
concept __comparison_common_type_with =
31-
common_reference_with<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>>;
32-
33-
# else
34-
3527
template <class _Tp, class _Up, class _CommonRef = common_reference_t<const _Tp&, const _Up&>>
3628
concept __comparison_common_type_with_impl =
3729
same_as<common_reference_t<const _Tp&, const _Up&>, common_reference_t<const _Up&, const _Tp&>> && requires {
@@ -42,8 +34,6 @@ concept __comparison_common_type_with_impl =
4234
template <class _Tp, class _Up>
4335
concept __comparison_common_type_with = __comparison_common_type_with_impl<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;
4436

45-
# endif // _LIBCPP_STD_VER < 23
46-
4737
#endif // _LIBCPP_STD_VER >= 20
4838

4939
_LIBCPP_END_NAMESPACE_STD

libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,8 @@ struct NoComparator {};
8989
// !indirect_strict_weak_order<Comp, projected<I1, Proj1>, projected<I2, Proj2>>
9090
static_assert(!HasPartialSortCopyIter<NoComparator*, NoComparator*, NoComparator*, NoComparator*>);
9191

92-
#if TEST_STD_VER < 23
93-
static_assert(!HasPartialSortCopyIter<int*, int*, MoveOnly*, MoveOnly*>);
94-
#else
9592
// P2404
9693
static_assert(HasPartialSortCopyIter<int*, int*, MoveOnly*, MoveOnly*>);
97-
#endif // TEST_STD_VER < 23
9894

9995
// Test constraints of the (range) overload.
10096
// ======================================================
@@ -129,12 +125,8 @@ static_assert(!HasPartialSortCopyRange<R<int*>, R<const int*>>);
129125
// !indirect_strict_weak_order<Comp, projected<iterator_t<R1>, Proj1>, projected<iterator_t<R2>, Proj2>>
130126
static_assert(!HasPartialSortCopyRange<R<NoComparator*>, R<NoComparator*>>);
131127

132-
#if TEST_STD_VER < 23
133-
static_assert(!HasPartialSortCopyRange<R<int*>, R<MoveOnly*>>);
134-
#else
135128
// P2404
136129
static_assert(HasPartialSortCopyRange<R<int*>, R<MoveOnly*>>);
137-
#endif // TEST_STD_VER < 23
138130

139131
static_assert(std::is_same_v<std::ranges::partial_sort_copy_result<int, int>, std::ranges::in_out_result<int, int>>);
140132

libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,14 +1117,8 @@ static_assert(
11171117
static_assert(
11181118
!check_equality_comparable_with<one_way_ne, explicit_operators>());
11191119

1120-
#if TEST_STD_VER < 23
1121-
static_assert(!check_equality_comparable_with<move_only_equality_with_int, int>());
1122-
static_assert(!check_equality_comparable_with<std::unique_ptr<int>, std::nullptr_t>());
1123-
#else
11241120
// P2404
11251121
static_assert(check_equality_comparable_with<move_only_equality_with_int, int>());
11261122
static_assert(check_equality_comparable_with<std::unique_ptr<int>, std::nullptr_t>());
1127-
#endif // TEST_STD_VER < 23
1128-
11291123
static_assert(!check_equality_comparable_with<nonmovable_equality_with_int, int>());
11301124
} // namespace types_fit_for_purpose

libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,8 @@ struct MoveOnlyIntComparable {
235235
friend auto operator<=>(MoveOnlyIntComparable const&, MoveOnlyIntComparable const&) = default;
236236
};
237237

238-
#if TEST_STD_VER < 23
239-
static_assert(!check_three_way_comparable_with<MoveOnlyIntComparable, int>());
240-
#else
241238
// P2404
242239
static_assert(check_three_way_comparable_with<MoveOnlyIntComparable, int>());
243-
#endif // TEST_STD_VER < 23
244240

245241
struct NonMovableIntComparable {
246242
NonMovableIntComparable(int) {}

libcxx/test/std/utilities/function.objects/range.cmp/equal_to.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ struct NotEqualityComparable {
3030
static_assert(!std::is_invocable_v<std::ranges::equal_to, NotEqualityComparable, NotEqualityComparable>);
3131
static_assert(std::is_invocable_v<std::ranges::equal_to, explicit_operators, explicit_operators>);
3232

33-
#if TEST_STD_VER < 23
34-
static_assert(!std::is_invocable_v<std::ranges::equal_to, int, MoveOnly>);
35-
#else
3633
// P2404
3734
static_assert(std::is_invocable_v<std::ranges::equal_to, int, MoveOnly>);
38-
#endif // TEST_STD_VER < 23
3935

4036
static_assert(requires { typename std::ranges::equal_to::is_transparent; });
4137

libcxx/test/std/utilities/function.objects/range.cmp/greater.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ struct NotTotallyOrdered {
2929
static_assert(!std::is_invocable_v<std::ranges::greater, NotTotallyOrdered, NotTotallyOrdered>);
3030
static_assert(std::is_invocable_v<std::ranges::greater, explicit_operators, explicit_operators>);
3131

32-
#if TEST_STD_VER < 23
33-
static_assert(!std::is_invocable_v<std::ranges::greater, int, MoveOnly>);
34-
#else
3532
// P2404
3633
static_assert(std::is_invocable_v<std::ranges::greater, int, MoveOnly>);
37-
#endif // TEST_STD_VER < 23
3834

3935
static_assert(requires { typename std::ranges::greater::is_transparent; });
4036

libcxx/test/std/utilities/function.objects/range.cmp/greater_equal.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ struct NotTotallyOrdered {
2929
static_assert(!std::is_invocable_v<std::ranges::greater_equal, NotTotallyOrdered, NotTotallyOrdered>);
3030
static_assert(std::is_invocable_v<std::ranges::greater_equal, explicit_operators, explicit_operators>);
3131

32-
#if TEST_STD_VER < 23
33-
static_assert(!std::is_invocable_v<std::ranges::greater_equal, int, MoveOnly>);
34-
#else
3532
// P2404
3633
static_assert(std::is_invocable_v<std::ranges::greater_equal, int, MoveOnly>);
37-
#endif // TEST_STD_VER < 23
3834

3935
static_assert(requires { typename std::ranges::greater_equal::is_transparent; });
4036

libcxx/test/std/utilities/function.objects/range.cmp/less.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ struct NotTotallyOrdered {
2929
static_assert(!std::is_invocable_v<std::ranges::less, NotTotallyOrdered, NotTotallyOrdered>);
3030
static_assert(std::is_invocable_v<std::ranges::less, explicit_operators, explicit_operators>);
3131

32-
#if TEST_STD_VER < 23
33-
static_assert(!std::is_invocable_v<std::ranges::less, int, MoveOnly>);
34-
#else
3532
// P2404
3633
static_assert(std::is_invocable_v<std::ranges::less, int, MoveOnly>);
37-
#endif // TEST_STD_VER < 23
3834

3935
static_assert(requires { typename std::ranges::less::is_transparent; });
4036

libcxx/test/std/utilities/function.objects/range.cmp/less_equal.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ struct NotTotallyOrdered {
2929
static_assert(!std::is_invocable_v<std::ranges::less_equal, NotTotallyOrdered, NotTotallyOrdered>);
3030
static_assert(std::is_invocable_v<std::ranges::less_equal, explicit_operators, explicit_operators>);
3131

32-
#if TEST_STD_VER < 23
33-
static_assert(!std::is_invocable_v<std::ranges::less_equal, int, MoveOnly>);
34-
#else
3532
// P2404
3633
static_assert(std::is_invocable_v<std::ranges::less_equal, int, MoveOnly>);
37-
#endif // TEST_STD_VER < 23
3834

3935
static_assert(requires { typename std::ranges::less_equal::is_transparent; });
4036

libcxx/test/std/utilities/function.objects/range.cmp/not_equal_to.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ struct NotEqualityComparable {
3030
static_assert(!std::is_invocable_v<std::ranges::equal_to, NotEqualityComparable, NotEqualityComparable>);
3131
static_assert(std::is_invocable_v<std::ranges::equal_to, explicit_operators, explicit_operators>);
3232

33-
#if TEST_STD_VER < 23
34-
static_assert(!std::is_invocable_v<std::ranges::not_equal_to, int, MoveOnly>);
35-
#else
3633
// P2404
3734
static_assert(std::is_invocable_v<std::ranges::not_equal_to, int, MoveOnly>);
38-
#endif // TEST_STD_VER < 23
3935

4036
static_assert(requires { typename std::ranges::not_equal_to::is_transparent; });
4137

0 commit comments

Comments
 (0)