OSDN Git Service

[ADT] ImmutableList no longer requires elements to be copy constructible
authorKristof Umann <dkszelethus@gmail.com>
Tue, 28 Aug 2018 14:17:51 +0000 (14:17 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Tue, 28 Aug 2018 14:17:51 +0000 (14:17 +0000)
commit0977b8082a9cfcd0b27a3fdcd0e36fbdbcdaf2e8
treef71c3a3e5803d3be82b4e4597828b8a2fccf2570
parent939bd02ce8e8f7fb1c3c39cf217b4fde1647ca90
[ADT] ImmutableList no longer requires elements to be copy constructible

ImmutableList used to require elements to have a copy constructor for no
good reason, this patch aims to fix this.
It also required but did not enforce its elements to be trivially
destructible, so a new static_assert is added to guard against misuse.

Differential Revision: https://reviews.llvm.org/D49985

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340824 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/ImmutableList.h
unittests/ADT/ImmutableListTest.cpp