diff options
author | Clement Courbet <courbet@google.com> | 2019-01-23 14:20:59 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2019-01-23 14:20:59 +0000 |
commit | c7956346dadc003b1563f0398c6fc90dab0b6f93 (patch) | |
tree | 1b496cb49c421b7c5c3fd995493c475e9aee3034 /llvm/unittests/ADT/ArrayRefTest.cpp | |
parent | 0e08b6f01755a44543809a6847467a17ffd5ee24 (diff) | |
download | bcm5719-llvm-c7956346dadc003b1563f0398c6fc90dab0b6f93.tar.gz bcm5719-llvm-c7956346dadc003b1563f0398c6fc90dab0b6f93.zip |
Re-land rL322538 "Add a value_type to ArrayRef."
llvm-svn: 351954
Diffstat (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/ArrayRefTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/ArrayRefTest.cpp b/llvm/unittests/ADT/ArrayRefTest.cpp index a5609f89ff9..0407fb41ea5 100644 --- a/llvm/unittests/ADT/ArrayRefTest.cpp +++ b/llvm/unittests/ADT/ArrayRefTest.cpp @@ -51,6 +51,14 @@ static_assert( "Assigning from an initializer list"); #endif +// Check Typedefs. +static_assert( + std::is_same<ArrayRef<int>::value_type, int>::value, + "erroneous value_type"); +static_assert( + std::is_same<ArrayRef<const int>::value_type, int>::value, + "erroneous value_type"); + namespace { TEST(ArrayRefTest, AllocatorCopy) { |