[libcxx-commits] [PATCH] D100160: [libcxx] adds `std::input_or_output_iterator` and `std::sentinel_for` to <iterator>
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 14 15:41:16 PDT 2021
zoecarver accepted this revision as: zoecarver.
zoecarver added a comment.
LGMT.
================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.iterator/input_or_output_iterator.compile.pass.cpp:185
+static_assert(
+ std::input_or_output_iterator<std::unordered_multiset<int, int>::iterator>);
+static_assert(std::input_or_output_iterator<
----------------
I'm not going to keep commenting on this if I see it again.
================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp:44-48
+struct not_semiregular {
+ not_semiregular() = delete;
+ bool operator==(std::input_or_output_iterator auto) const;
+};
+static_assert(!std::sentinel_for<not_semiregular, std::vector<int>::iterator>);
----------------
miscco wrote:
> semi_regular also requires copyability (https://eel.is/c++draft/concepts.object). Please add a check that a non copyable iterator is not a sentinel for itself (aka move-only input iterators)
+1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100160/new/
https://reviews.llvm.org/D100160
More information about the libcxx-commits
mailing list