Unordered set of unique KEY values with open‐addressing storage.
Synopsis
Declared in <bdlc_flathashset.h>
template<
class KEY,
class HASH = bslh::FibonacciBadHashWrapper<bsl::hash<KEY>>,
class EQUAL = bsl::equal_to<KEY>>
class FlatHashSet;
Description
This class template implements a value‐semantic container type holding an unordered set of unique values of (template parameter) type KEY. The (template parameter) type HASH is a functor providing the hash value for KEY. The (template parameter) type EQUAL is a functor providing the equality function for two KEY values. See {Requirements on KEY, HASH, and EQUAL} for more information.
Type Aliases
Name |
Description |
Const iterator over elements. |
|
Pointer to a non‐modifiable value. |
|
Reference to a non‐modifiable value. |
|
Signed type used for iterator distances. |
|
Hash functor type. |
|
Iterator over elements (const, since set values are immutable). |
|
Key equality predicate type. |
|
Key type of this set (also the element type). |
|
Pointer to a modifiable value. |
|
Reference to a modifiable value. |
|
Unsigned type used for sizes and capacities. |
|
Value equality predicate type (same as |
|
Element type stored by this set. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object and each of its elements. |
Assignment operators |
|
Return the allocator used by this flat hash set to supply memory. |
|
Return a |
|
Return the number of elements this set could hold if the load factor were 1. |
|
Return a |
|
Return a |
|
Remove all elements from this set. |
|
|
|
|
|
Emplace a newly constructed element into this set. |
|
Emplace a newly constructed element, using an insertion hint. |
|
Return |
|
Return a |
|
|
|
|
|
|
|
Return (a copy of) the unary hash functor used by this set to generate a hash value (of type |
|
|
|
Return (a copy of) the binary key‐equality functor that returns |
|
Return the current ratio between the number of elements in this container and its capacity. |
|
Return the maximum load factor allowed for this set. |
|
Format this object to the specified output stream. |
|
Rehash this set to at least the specified minimum capacity. |
|
Reserve capacity for at least the specified number of entries. |
|
Remove all elements from this set and release all memory from this set, returning the set to the default constructed state. |
|
Return the number of elements in this set. |
|
Exchange the value of this set with that of the specified |
Friends
Name |
Description |
Exchange the contents of the two sets. |
|
Return whether the sets differ in contents. |
|
Return whether the sets have the same contents. |
Non-Member Functions
Name |
Description |
Return whether two sets do not have the same value. |
|
Return whether two sets have the same value. |
|
Exchange the value, hasher, and key‐equality functor of two sets. |
Created with MrDocs