[libcxx-commits] [PATCH] D98983: [libcxx] adds concepts `std::totally_ordered` and `std::totally_ordered_with`

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 20 15:35:41 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/include/concepts:393
+    common_reference_t<
+      const remove_reference_t<_Tp>&,
+      const remove_reference_t<_Up>&>> &&
----------------
curdeius wrote:
> Would it make sense to add a helper for `const remove_reference_t<_Tp>&` as it starts repeating a lot?
I'm ambivalent on all these refactoring ideas, but I'll at least offer a bikeshed name on this one. ;)

```
template<class _Tp>
using __const_ref_t = const remove_reference_t<_Tp>&;

    ... totally_ordered<common_reference_t<__const_ref_t<_Tp>, __const_ref_t<_Up>>> ...
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98983



More information about the libcxx-commits mailing list