[PATCH] D91837: ADT: Fix reference invalidation in SmallVector APIs that pass in a value
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 14:38:27 PST 2020
njames93 added inline comments.
================
Comment at: llvm/include/llvm/ADT/SmallVector.h:694
+ // update the pointer values in insert_one_impl.
+ return insert_one_impl(I, T(Elt));
+ }
----------------
Shouldn't this use the move constructor `T(std::move(Elt))` Otherwise this adds the unnecessary requirement that T is copyable when calling the xvalue version of insert.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91837/new/
https://reviews.llvm.org/D91837
More information about the llvm-commits
mailing list