[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
Thu Aug 2 06:28:38 PDT 2018


Szelethus updated this revision to Diff 158743.
Szelethus added a comment.
Herald added a subscriber: mgorny.

Added a new `emplace` method, and the rest of the factory methods now take the data argument by value.
I also added a unittest file. It does code unrelated to this patch, but since the file didn't exist, I though it's okay to hit two birds with one stone.

On a somewhat unrelated note, is there a need for `concat` to be public? Also, to me, when I think if the word concatenation, I would first think that it would work similar to `std::list<T>::append()`.


https://reviews.llvm.org/D49985

Files:
  include/llvm/ADT/ImmutableList.h
  unittests/ADT/CMakeLists.txt
  unittests/ADT/ImmutableListTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49985.158743.patch
Type: text/x-patch
Size: 9696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180802/1856e39f/attachment.bin>


More information about the llvm-commits mailing list