Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions stl/inc/compare
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,7 @@ concept three_way_comparable = _Half_equality_comparable<_Ty, _Ty> && _Half_orde

_EXPORT_STD template <class _Ty1, class _Ty2, class _Cat = partial_ordering>
concept three_way_comparable_with =
three_way_comparable<_Ty1, _Cat> && three_way_comparable<_Ty2, _Cat>
#if _HAS_CXX23
&& _Comparison_common_type_with<_Ty1, _Ty2>
#else // ^^^ _HAS_CXX23 / !_HAS_CXX23 vvv
&& common_reference_with<const remove_reference_t<_Ty1>&, const remove_reference_t<_Ty2>&>
#endif // ^^^ !_HAS_CXX23 ^^^
three_way_comparable<_Ty1, _Cat> && three_way_comparable<_Ty2, _Cat> && _Comparison_common_type_with<_Ty1, _Ty2>
&& three_way_comparable<common_reference_t<const remove_reference_t<_Ty1>&, const remove_reference_t<_Ty2>&>, _Cat>
&& _Weakly_equality_comparable_with<_Ty1, _Ty2> && _Partially_ordered_with<_Ty1, _Ty2>
&& requires(const remove_reference_t<_Ty1>& __t, const remove_reference_t<_Ty2>& __u) {
Expand Down
9 changes: 1 addition & 8 deletions stl/inc/concepts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ concept _Weakly_equality_comparable_with =
_EXPORT_STD template <class _Ty>
concept equality_comparable = _Half_equality_comparable<_Ty, _Ty>;

#if _HAS_CXX23
template <class _Ty1, class _Ty2, class _Ref = common_reference_t<const _Ty1&, const _Ty2&>>
concept _Comparison_common_type_with_impl = same_as<_Ref, common_reference_t<const _Ty2&, const _Ty1&>> && requires {
requires convertible_to<const _Ty1&, const _Ref&> || convertible_to<_Ty1, const _Ref&>;
Expand All @@ -201,16 +200,10 @@ concept _Comparison_common_type_with_impl = same_as<_Ref, common_reference_t<con

template <class _Ty1, class _Ty2>
concept _Comparison_common_type_with = _Comparison_common_type_with_impl<remove_cvref_t<_Ty1>, remove_cvref_t<_Ty2>>;
#endif // _HAS_CXX23

_EXPORT_STD template <class _Ty1, class _Ty2>
concept equality_comparable_with =
equality_comparable<_Ty1> && equality_comparable<_Ty2>
#if _HAS_CXX23
&& _Comparison_common_type_with<_Ty1, _Ty2>
#else // ^^^ _HAS_CXX23 / !_HAS_CXX23 vvv
&& common_reference_with<const remove_reference_t<_Ty1>&, const remove_reference_t<_Ty2>&>
#endif // ^^^ !_HAS_CXX23 ^^^
equality_comparable<_Ty1> && equality_comparable<_Ty2> && _Comparison_common_type_with<_Ty1, _Ty2>
&& equality_comparable<common_reference_t<const remove_reference_t<_Ty1>&, const remove_reference_t<_Ty2>&>>
&& _Weakly_equality_comparable_with<_Ty1, _Ty2>;

Expand Down
9 changes: 2 additions & 7 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
// P2367R0 Remove Misuses Of List-Initialization From Clause 24 Ranges
// P2372R3 Fixing Locale Handling In chrono Formatters
// P2393R1 Cleaning Up Integer-Class Types
// P2404R3 Move-Only Types For Comparison Concepts
// P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms
// P2415R2 What Is A view?
// P2418R2 Add Support For std::generator-like Types To std::format
Expand Down Expand Up @@ -365,7 +366,6 @@
// P2322R6 ranges::fold_left, ranges::fold_right, Etc.
// P2374R4 views::cartesian_product
// P2387R3 Pipe Support For User-Defined Range Adaptors
// P2404R3 Move-Only Types For Comparison Concepts
// P2417R2 More constexpr bitset
// P2438R2 string::substr() &&
// P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right
Expand Down Expand Up @@ -1681,6 +1681,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_bounded_array_traits 201902L
#define __cpp_lib_common_reference 202302L
#define __cpp_lib_common_reference_wrapper 202302L
#define __cpp_lib_concepts 202207L
#define __cpp_lib_constexpr_algorithms 201806L
#define __cpp_lib_constexpr_complex 201711L
#define __cpp_lib_constexpr_dynamic_alloc 201907L
Expand Down Expand Up @@ -1818,12 +1819,6 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_chrono 201510L // P0092R1 <chrono> floor(), ceil(), round(), abs()
#endif

#if _HAS_CXX23
#define __cpp_lib_concepts 202207L // P2404R3 Move-Only Types For Comparison Concepts
#elif _HAS_CXX20
#define __cpp_lib_concepts 202002L // P1964R2 Replacing boolean With boolean-testable
#endif

#if _HAS_CXX23
#define __cpp_lib_constexpr_memory 202202L // P2273R3 constexpr unique_ptr
#elif _HAS_CXX20
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

RUNALL_INCLUDE ..\usual_latest_matrix.lst
RUNALL_INCLUDE ..\usual_20_matrix.lst
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@ STATIC_ASSERT(__cpp_lib_common_reference_wrapper == 202302L);

STATIC_ASSERT(__cpp_lib_complex_udls == 201309L);

#if _HAS_CXX23
#if _HAS_CXX20
STATIC_ASSERT(__cpp_lib_concepts == 202207L);
#elif _HAS_CXX20
STATIC_ASSERT(__cpp_lib_concepts == 202002L);
#elif defined(__cpp_lib_concepts)
#error __cpp_lib_concepts is defined
#endif
Expand Down