[libcxx-commits] [PATCH] D118686: [libc++][ranges][NFC] Test the specializations of `tuple_{size, element}` for ranges.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 1 14:01:29 PST 2022


Quuxplusone requested changes to this revision.
Quuxplusone added a comment.
This revision now requires changes to proceed.

Requesting changes, in the sense that I think this PR should simply be abandoned.
(If the tests are cleaned up a bit, then sure, they don't seem //harmful//. But I won't be a positive approver on this; I'll let two other people go on record as claiming it's useful.)



================
Comment at: libcxx/include/ranges:257
 #include <__ranges/size.h>
-#include <__ranges/subrange.h>
+#include <__ranges/subrange.h> // This also makes the specializations of `tuple_{size,element}` available.
 #include <__ranges/take_view.h>
----------------
Please remove the comment.


================
Comment at: libcxx/test/std/ranges/tuple_specializations.compile.pass.cpp:20-21
+#include <type_traits>
+// Note: make sure to not include `<utility>` (or any other header including `<utility>`) because it also makes some
+// tuple specializations available, thus obscuring whether the `<ranges>` includes work correctly..
+
----------------
This comment is unhelpful, because it is unspecified and unobservable whether `<ranges>` includes `<utility>`. (I would bet that it does.)
Anyway, if you really really want to make sure, just include nothing but `<ranges>`, and `s/is_same_v/same_as/` below (because `same_as` is guaranteed to exist in `<concepts>` which is guaranteed to be included by `<ranges>`).


================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.compile.pass.cpp:11
+
+// Tested in ranges/tuple_specializations.compile.pass.cpp
----------------
I would like us to move away from no-op tests, if possible.


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