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

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 1 16:54:42 PST 2022


var-const marked 2 inline comments as done.
var-const added inline comments.


================
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>
----------------
Quuxplusone wrote:
> var-const wrote:
> > Quuxplusone wrote:
> > > Please remove the comment.
> > Why?
> Because (1) we don't add comments for any other headers, and (2) the fact that `__ranges/subrange.h` includes the API of `std::ranges::subrange` is obvious. We don't need to say "This makes `subrange` available, and all its methods, and its `get` overload, and its `tuple_size` and `tuple_element`, and its `enable_borrowed_range`, and its `enable_view`, and its..." We don't need to say //any// of that, because it's obvious from the filename.
Ah, thanks for calling it out, the comment is indeed wrong. It should refer to the "general" templates, not the specializations. PTAL.


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