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

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 27 17:16:12 PDT 2021


cjdb added a comment.

Are there any further blockers on this patch? I think I've replied to all the feedback.



================
Comment at: libcxx/include/concepts:217
   is_lvalue_reference_v<_Lhs> &&
-  common_reference_with<const remove_reference_t<_Lhs>&, const remove_reference_t<_Rhs>&> &&
+  common_reference_with<__const_lvalue_ref<_Lhs>, __const_lvalue_ref<_Rhs>> &&
   requires (_Lhs __lhs, _Rhs&& __rhs) {
----------------
Mordante wrote:
> Quuxplusone wrote:
> > cjdb wrote:
> > > Mordante wrote:
> > > > Minor bikeshed; since the standard type traits start with a verb I would like to do the same here. This "trait" is like `make_signed_t` so I would suggest `__make_const_lvalue_ref`.
> > > If we're going to add more characters, does this still benefit us over `const remove_reference_t<_Tp>&`?
> > IMHO even `__const_lvalue_ref<T>` has //already// lost the benefit of brevity. I wanted `__const_ref_t<T>` to be the spelling that creates a "const T ref"; I see no point to saying `lvalue` because, what, you expected a const //rvalue// ref? 😛I thought the trailing `_t` would be noncontroversial, but actually if people prefer `__const_ref<T>` or even `_ConstRef<T>` I think that's great.
> > Anyway, sounds like a huge bikeshed and I don't want to block anything either way.
> I also don't want to start a big bikeshed, but I personally prefer names to be clear. But it's no blocker for me.
I added `make`.


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