[PATCH] D49985: [ADT] ImmutableList no longer requires elements to be copy constructible

Umann Kristóf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 10:24:46 PDT 2018


Szelethus added inline comments.


================
Comment at: include/llvm/ADT/ImmutableList.h:172
 
-  LLVM_NODISCARD ImmutableList<T> concat(const T &Head, ImmutableList<T> Tail) {
+  LLVM_NODISCARD ImmutableList<T> concat(T Head, ImmutableList<T>  Tail) {
     // Profile the new list to see if it already exists in our cache.
----------------
george.karpenkov wrote:
> Shouldn't we have `&&` here as well for Head?
I intentionally left it like this, because one can just `std::move` to it. That does achieve the same thing, right?


https://reviews.llvm.org/D49985





More information about the llvm-commits mailing list