summaryrefslogtreecommitdiff
path: root/absl/container/node_hash_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/node_hash_set.h')
-rw-r--r--absl/container/node_hash_set.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/absl/container/node_hash_set.h b/absl/container/node_hash_set.h
index 103d32d2..ad54b6dc 100644
--- a/absl/container/node_hash_set.h
+++ b/absl/container/node_hash_set.h
@@ -44,7 +44,7 @@
#include "absl/memory/memory.h"
namespace absl {
-inline namespace lts_2019_08_08 {
+ABSL_NAMESPACE_BEGIN
namespace container_internal {
template <typename T>
struct NodeHashSetPolicy;
@@ -77,7 +77,7 @@ struct NodeHashSetPolicy;
//
// // Create a node hash set of three strings
// absl::node_hash_map<std::string, std::string> ducks =
-// {"huey", "dewey"}, "louie"};
+// {"huey", "dewey", "louie"};
//
// // Insert a new element into the node hash map
// ducks.insert("donald"};
@@ -111,7 +111,7 @@ class node_hash_set
// * Initializer List constructor
//
// absl::node_hash_set<std::string> set2 =
- // {{"huey"}, {"dewey"}, {"louie"},};
+ // {{"huey"}, {"dewey"}, {"louie"}};
//
// * Copy constructor
//
@@ -435,6 +435,14 @@ class node_hash_set
void resize(typename Base::size_type hint) { this->rehash(hint); }
};
+// erase_if(node_hash_set<>, Pred)
+//
+// Erases all elements that satisfy the predicate `pred` from the container `c`.
+template <typename T, typename H, typename E, typename A, typename Predicate>
+void erase_if(node_hash_set<T, H, E, A>& c, Predicate pred) {
+ container_internal::EraseIf(pred, &c);
+}
+
namespace container_internal {
template <class T>
@@ -484,7 +492,7 @@ struct IsUnorderedContainer<absl::node_hash_set<Key, Hash, KeyEqual, Allocator>>
: std::true_type {};
} // namespace container_algorithm_internal
-} // inline namespace lts_2019_08_08
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_CONTAINER_NODE_HASH_SET_H_