[libc++][compare] Implement three_way_comparable[_with] concepts
Implementation of `three_way_comparable` and `three_way_comparable_with` concepts from <compare> header.
Please note that I have temporarily removed `<compare>` header from `<utility>` due to cyclic dependency that prevents using `<concepts>` header in `<compare>` one.
I tried to quickly resolve those issues including applying suggestions from @cjdb and dive deeper by myself but the problem seems more complicated that we thought initially.
I am in progress to prepare the patch with resolving this cyclic dependency between headers but for now I decided to put all that I have to the review to unblock people that depend on that functionality. At first glance the patch with resolving cyclic dependency is not so small (unless I find the way to make it smaller and cleaner) so I don't want to mix everything to one review.
Reviewed By: ldionne, cjdb, #libc, Quuxplusone
Differential Revision: https://reviews.llvm.org/D103478
NOKEYCHECK=True
GitOrigin-RevId: 8ce2675b1363ea0afa160e5fc564199857e8506c
diff --git a/include/module.modulemap b/include/module.modulemap
index ba14615..4986fd6 100644
--- a/include/module.modulemap
+++ b/include/module.modulemap
@@ -370,6 +370,7 @@
module common_comparison_category { private header "__compare/common_comparison_category.h" }
module compare_three_way_result { private header "__compare/compare_three_way_result.h" }
module ordering { private header "__compare/ordering.h" }
+ module three_way_comparable { private header "__compare/three_way_comparable.h" }
}
}
module complex {