[libcxx-commits] [PATCH] D103478: [libc++][compare] Implement three_way_comparable[_with] concepts

Ruslan Arutyunyan via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 1 11:30:00 PDT 2021


rarutyun created this revision.
rarutyun added reviewers: ldionne, cjdb, Mordante, zoecarver.
rarutyun added a project: libc++.
rarutyun requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103478

Files:
  libcxx/include/compare
  libcxx/include/utility
  libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp
  libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp
  libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103478.349031.patch
Type: text/x-patch
Size: 17738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210601/267a58ee/attachment.bin>


More information about the libcxx-commits mailing list