aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unittests/ADT/DenseMapTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/ADT/DenseMapTest.cpp b/unittests/ADT/DenseMapTest.cpp
index e04bba7..3fe35c9 100644
--- a/unittests/ADT/DenseMapTest.cpp
+++ b/unittests/ADT/DenseMapTest.cpp
@@ -66,8 +66,17 @@ TYPED_TEST(DenseMapTest, EmptyIntMapTest) {
// Lookup tests
EXPECT_FALSE(this->Map.count(this->getKey()));
EXPECT_TRUE(this->Map.find(this->getKey()) == this->Map.end());
+#ifndef _MSC_VER
EXPECT_EQ(typename TypeParam::mapped_type(),
this->Map.lookup(this->getKey()));
+#else
+ // MSVC, at least old versions, cannot parse the typename to disambiguate
+ // TypeParam::mapped_type as a type. However, because MSVC doesn't implement
+ // two-phase name lookup, it also doesn't require the typename. Deal with
+ // this mutual incompatibility through specialized code.
+ EXPECT_EQ(TypeParam::mapped_type(),
+ this->Map.lookup(this->getKey()));
+#endif
}
// Constant map tests