[libcxx-commits] [PATCH] D102639: [libcxx][ranges] Add `indirectly_­movable`.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 17 16:29:33 PDT 2021


cjdb requested changes to this revision.
cjdb added a comment.
This revision now requires changes to proceed.

Please don't forget the subsumption tests.



================
Comment at: libcxx/test/std/containers/associative/map/iterator_concept_conformance.compile.pass.cpp:36-43
+static_assert(!std::indirectly_movable<iterator, iterator>);
+static_assert(!std::indirectly_movable_storable<iterator, iterator>);
+static_assert(!std::indirectly_movable<iterator, const_iterator>);
+static_assert(!std::indirectly_movable_storable<iterator, const_iterator>);
+static_assert(!std::indirectly_movable<iterator, reverse_iterator>);
+static_assert(!std::indirectly_movable_storable<iterator, reverse_iterator>);
+static_assert(!std::indirectly_movable<iterator, const_reverse_iterator>);
----------------
If an iterator isn't `indirectly_writable`, then it doesn't need to be on the RHS of this test.


================
Comment at: libcxx/test/std/iterators/iterator.requirements/alg.req/ind.move.compile.pass.cpp:94-104
+static_assert( std::indirectly_movable_storable<int*, int*>);
+static_assert( std::indirectly_movable_storable<const int*, int *>);
+static_assert( std::indirectly_movable_storable<int*, int[2]>);
+static_assert( std::indirectly_movable_storable<Empty*, Empty*>);
+static_assert( std::indirectly_movable_storable<MoveOnly*, MoveOnly*>);
+static_assert( std::indirectly_movable<int*, IndirectlyMovableWithInt>);
+static_assert( std::indirectly_movable_storable<MoveOnlyWrapper, MoveOnlyWrapper>);
----------------
I think you're missing a test for when exactly one of each concept is false. Also, can we get these moved into an `indirectly_movable_storable.cpp` test please?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102639



More information about the libcxx-commits mailing list