[libcxx-commits] [PATCH] D101371: [libcxx][ranges] Fix tests for stdlib types that conform to sized_sentinel_for.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 27 09:09:57 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/containers/associative/map/iterator_concept_conformance.compile.pass.cpp:47-48
 static_assert(!std::sentinel_for<const_iterator, const_reverse_iterator>);
-static_assert(std::sentinel_for<iterator, iterator>);
-static_assert(std::sentinel_for<iterator, const_iterator>);
-static_assert(!std::sentinel_for<iterator, reverse_iterator>);
-static_assert(!std::sentinel_for<iterator, const_reverse_iterator>);
+static_assert(std::sized_sentinel_for<const_iterator, iterator>);
+static_assert(std::sized_sentinel_for<const_iterator, const_iterator>);
+static_assert(!std::sized_sentinel_for<const_iterator, reverse_iterator>);
----------------
You mean `!std::sized_sentinel_for`, since these iterators are merely bidirectional. (Sized-sentinel-ness essentially requires random-access iterators, because it requires subtraction to work.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101371



More information about the libcxx-commits mailing list