| Index: base/stl_util-inl.h
|
| diff --git a/base/stl_util-inl.h b/base/stl_util-inl.h
|
| index 54b7b296c0ad2adc76bb9261535b95bf6d4fd9f2..70fa69e57d7bb415799ade34de914a7214f945a4 100644
|
| --- a/base/stl_util-inl.h
|
| +++ b/base/stl_util-inl.h
|
| @@ -447,4 +447,11 @@ std::vector<T> SetToVector(const std::set<T>& values) {
|
| return result;
|
| }
|
|
|
| +// Test to see if a set, map, hash_set or hash_map contains a particular key.
|
| +// Returns true if the key is in the collection.
|
| +template <typename Collection, typename Key>
|
| +bool ContainsKey(const Collection& collection, const Key& key) {
|
| + return collection.find(key) != collection.end();
|
| +}
|
| +
|
| #endif // BASE_STL_UTIL_INL_H_
|
|
|