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

Wmbat via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 4 12:27:48 PDT 2021


Wmbat added a comment.

In D103478#2797854 <https://reviews.llvm.org/D103478#2797854>, @tcanens wrote:

> In D103478#2794869 <https://reviews.llvm.org/D103478#2794869>, @Quuxplusone wrote:
>
>>> I was looking at how to implement compare_three_way and found out that it needs to be present in both <compare> and <functional> according to the standard draft ( <function> synopsis, <compare> synopsis).
>>
>> Sounds like someone should file an LWG issue. I'm not aware of any other library facilities that are listed multiple times in different places in the Standard. This might be a cut-and-paste error.
>
> This is the new way to say "this thing is provided if you include either header": https://github.com/cplusplus/draft/issues/3683
>
> It's very much intentional that `compare_three_way` is available if you include either `<functional>` or `<compare>`.

Then, my proposition stands. We would have to either make `<functional>` include all of `<compare>` or make a separate header that contains everything that `compare_three_way` needs and have it be included by both `<compare>` and `<functional>`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103478/new/

https://reviews.llvm.org/D103478



More information about the libcxx-commits mailing list