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

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 20 15:02:58 PDT 2021


cjdb added inline comments.


================
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>);
----------------
zoecarver wrote:
> cjdb wrote:
> > 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?
> Can you point out the cases that aren't covered? I think I've got them all, except maybe  `!constructible_from`.
> 
> I think this is still a fairly small test file, and it's nice to be able to reuse types. 
I don't see cases where only:

* `indirectly_movable` is false
* `indirectly_writable` is false
* `constructible_from` is false
* `assignable_from` is false


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