Index: base/containers/scoped_ptr_hash_map_unittest.cc |
diff --git a/base/containers/scoped_ptr_hash_map_unittest.cc b/base/containers/scoped_ptr_hash_map_unittest.cc |
index 88fe41f9a0dfe4aa2cc020d80ac26720f6482c43..5600aad4e451a786af57164ed2c0df582fc98092 100644 |
--- a/base/containers/scoped_ptr_hash_map_unittest.cc |
+++ b/base/containers/scoped_ptr_hash_map_unittest.cc |
@@ -9,6 +9,13 @@ |
namespace base { |
namespace { |
+namespace namespace_with_ignore_result { |
danakj
2015/10/29 17:48:39
can you whitespace better here?
1 whitespace abov
Sam McNally
2015/10/30 00:18:40
Done.
|
+ |
+class Value {}; |
+ |
+template <typename T> |
+void ignore_result(const T&) {} |
+} |
struct DeleteCounter { |
public: |
@@ -81,5 +88,13 @@ TEST(ScopedPtrHashMapTest, CustomDeleter) { |
EXPECT_EQ(3, CountingDeleter::count()); |
} |
+// Test that using a value type from a namespace containing an ignore_result |
+// function compiles correctly. |
+TEST(ScopedPtrHashMapTest, IgnoreResultCompile) { |
+ ScopedPtrHashMap<int, scoped_ptr<namespace_with_ignore_result::Value>> |
+ scoped_map; |
+ scoped_map.add(1, make_scoped_ptr(new namespace_with_ignore_result::Value)); |
+} |
+ |
} // namespace |
} // namespace base |