[libcxx-commits] [PATCH] D117369: [libcxx][test] `unordered_meow` iterators are not portably non-bidi
Casey Carter via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 18 11:43:37 PST 2022
CaseyCarter added inline comments.
================
Comment at: libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp:66-67
static_assert(!std::sized_sentinel_for<const_local_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_local_iterator, std::pair<int, int>*>);
+static_assert(!std::indirectly_movable_storable<const_local_iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<const_local_iterator, const_local_iterator>);
----------------
Quuxplusone wrote:
> Pre-existing: I suspect that the intent was to use `value_type*` here, not `std::pair<int, int>*` (and likewise `value_type*` in place of `int*` in the unordered_set tests). No action required, but if you //want// to fix it, go for it. (I don't think the change should affect the results of these static_asserts.)
`value_type` is `pair<const int, int>`. `*declval<pair<const int, int>*>() = ranges::iter_move(some_iterator)` is never going to be a valid expression, so all of these `indirectly_movable{_storable,}` tests would yield false. That said, I'm not sure what value these provide - it may make sense to remove them in a followup.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117369/new/
https://reviews.llvm.org/D117369
More information about the libcxx-commits
mailing list