Insert a single element in the set.
Insert a range of element in the set.
foreach support
key in set syntax support.
Remove value from the map.
Remove values from the map.
Constructor with the Allocator.
Constructor taking an initial capacity and the Allocator. Given capacity is automatically normalized to proper value.
Constructor taking an initial capacity. Given capacity is automatically normalized to proper value.
Setter for hash seed.
Reorganizes the container in place.
Removes all remaining slots from a container.
element type
Allocator type for internal allocation. Default is "shared const Mallocator"
NOTE: Set doesn't guarantee pointer stability. Range and returned pointers are invalidated after insert/rehash.
// Initialize Set with capacity auto set = Set!(string)(10); // Default capacity is 0 set.insert("key"); // set.insert(["k1", "k2"]) also supported if ("key" in set) // do something set.remove("key"); // set.remove(["k1", "k2"]) also supported set.length; set.clear; set.rehash; set.dup; K[] keys = set.keys; foreach (k; set.byKey()) {}
Copyright 2024- Masahiro Nakagawa Authros: Masahiro Nakagawa
Swiss tables hash set