Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: base/containers/flat_set.h

Issue 2723853002: Implementing erase/erase_if functions from library fundamentals ts: (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/containers/flat_set_unittest.cc » ('j') | base/stl_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/containers/flat_set.h
diff --git a/base/containers/flat_set.h b/base/containers/flat_set.h
index ae444c2c8e21c38ebec295ee023a365b84b3e057..348d942a98150459e7e675587b5f6e19333922f4 100644
--- a/base/containers/flat_set.h
+++ b/base/containers/flat_set.h
@@ -10,6 +10,8 @@
#include <utility>
#include <vector>
+#include "base/stl_util.h"
+
namespace base {
// Overview:
@@ -657,6 +659,14 @@ void flat_set<Key, Compare>::swap(flat_set& other) {
std::swap(impl_, other.impl_);
}
+// ----------------------------------------------------------------------------
+// Free functions.
+
+template <typename Key, typename Compare, typename Predicate>
+void STLEraseIf(base::flat_set<Key, Compare>& container, Predicate pred) {
+ STLEraseRemoveIf(container, pred);
+}
+
} // namespace base
#endif // BASE_CONTAINERS_FLAT_SET_H_
« no previous file with comments | « no previous file | base/containers/flat_set_unittest.cc » ('j') | base/stl_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698