[libcxx-commits] [PATCH] D99855: [libcxx] makes `iterator_traits` C++20-aware

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 13 11:07:16 PDT 2021


Mordante added inline comments.


================
Comment at: libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.pass.cpp:16
+
+#include <iterator>
+
----------------
cjdb wrote:
> Mordante wrote:
> > I would like some tests using the `contiguous_iterator_tag` see whether it acts as a `random_access_iterator_tag`.
> Is that in scope for this test? I need a bit of convincing :-)
The `contiguous_­iterator` is part of the cxx20 iterators, so seems like a good reason to test it here. If not, where do you want to test it?


================
Comment at: libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.pass.cpp:183
+    static_assert(std::same_as<typename iterator_traits::difference_type,
+                               typename iterator_traits::difference_type>);
+    static_assert(std::same_as<typename iterator_traits::reference, void>);
----------------
Mordante wrote:
> `std::same_as` compares the same type.
I still see the same types ;-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99855



More information about the libcxx-commits mailing list