[libcxx-commits] [PATCH] D118686: [libc++][ranges] Specialize `tuple_{size, element}` for ranges.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 1 12:07:17 PST 2022


var-const added a comment.

In D118686#3287611 <https://reviews.llvm.org/D118686#3287611>, @Quuxplusone wrote:

> I believe this is redundant with D108054 <https://reviews.llvm.org/D108054>, which was committed quite a while ago now.
> Anyway, specializations and customizations (of `swap`, `hash`, `get`, `tuple_size`, `enable_borrowed_range`, `is_error_code_enum`,...) belong next to the class they appertain to, not in a separate header. So if there's actually something to do here, please move the code into the `subrange.h` header (at which point it becomes at best a diff against what's there now).

Oh, thanks a lot, I missed that. The new code is indeed unnecessary.

I think updating the synopsis is still necessary, though. What do you think about the tests? They test the specializations more directly and have the advantage of being compile-time tests, but on the other hand, don't really provide more coverage than the tests from the patch you linked.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118686



More information about the libcxx-commits mailing list