summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/DenseSetTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/DenseSetTest.cpp')
-rw-r--r--llvm/unittests/ADT/DenseSetTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/DenseSetTest.cpp b/llvm/unittests/ADT/DenseSetTest.cpp
index 03738e46be4..0247f023dce 100644
--- a/llvm/unittests/ADT/DenseSetTest.cpp
+++ b/llvm/unittests/ADT/DenseSetTest.cpp
@@ -15,6 +15,13 @@ using namespace llvm;
namespace {
+static_assert(std::is_const<std::remove_pointer<
+ DenseSet<int>::const_iterator::pointer>::type>::value,
+ "Iterator pointer type should be const");
+static_assert(std::is_const<std::remove_reference<
+ DenseSet<int>::const_iterator::reference>::type>::value,
+ "Iterator reference type should be const");
+
// Test hashing with a set of only two entries.
TEST(DenseSetTest, DoubleEntrySetTest) {
llvm::DenseSet<unsigned> set(2);
OpenPOWER on IntegriCloud