[PATCH] D83902: [ADT] Add a range-based version of std::move
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 04:13:28 PDT 2020
njames93 marked an inline comment as done.
njames93 added inline comments.
================
Comment at: llvm/unittests/ADT/STLExtrasTest.cpp:613
+
+ llvm::move(std::move(V2), std::back_inserter(V3));
+
----------------
When I put std::forward on the range, this call failed to compile as the copy constructor of `Foo` has been deleted. So for some reason when the container is forwarded to `adl_begin` and `adl_end`, it results in trying to create a copy of the container first.
This call though doesn't actually move `V2`, its contents have been moved, but the items are still in there (`size() == ItemCount`).
That one has me a little perplexed. Should say nothing strange showed up with ASAN even when I changed to using heap allocation instead of the SmallVector inline storage.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83902/new/
https://reviews.llvm.org/D83902
More information about the llvm-commits
mailing list