Index: base/containers/scoped_ptr_map_unittest.cc |
diff --git a/base/containers/scoped_ptr_map_unittest.cc b/base/containers/scoped_ptr_map_unittest.cc |
index 706b2edfb188b264073989b1d06ce5d79a291dd5..086c4fe827113a2ef8f648d1a4012291a7be0891 100644 |
--- a/base/containers/scoped_ptr_map_unittest.cc |
+++ b/base/containers/scoped_ptr_map_unittest.cc |
@@ -16,6 +16,15 @@ |
namespace base { |
namespace { |
+namespace namespace_with_ignore_result { |
+ |
+class Value {}; |
+ |
+template <typename T> |
+void ignore_result(const T&) {} |
+ |
+} // namespace namespace_with_ignore_result |
+ |
// A ScopedDestroyer sets a Boolean to true upon destruction. |
class ScopedDestroyer { |
public: |
@@ -251,5 +260,13 @@ TEST(ScopedPtrMapTest, Passed) { |
EXPECT_TRUE(destroyed); |
}; |
+// Test that using a value type from a namespace containing an ignore_result |
+// function compiles correctly. |
+TEST(ScopedPtrMapTest, IgnoreResultCompile) { |
+ ScopedPtrMap<int, scoped_ptr<namespace_with_ignore_result::Value>> scoped_map; |
+ scoped_map.insert(1, |
+ make_scoped_ptr(new namespace_with_ignore_result::Value)); |
+} |
+ |
} // namespace |
} // namespace base |