Ordered unique-key map stored on Base's heap. More...
#include <StormByte/safe/map.hxx>
Classes | |
| class | value_compare |
| Orders entries by key, using the map comparator. More... | |
| class | BasicIterator |
| Bidirectional cursor over Base-owned map nodes. More... | |
| class | node_type |
| Owning handle to one extracted Base node. More... | |
| struct | insert_return_type |
| Result of inserting an extracted node. More... | |
Public Types | |
| using | key_type = K |
| Key type. | |
| using | mapped_type = V |
| Mapped type. | |
| using | value_type = Pair<const K, V> |
| Entry type. The key is immutable. | |
| using | key_compare = Compare |
| Key ordering. | |
| using | size_type = Size |
| Element count. Size, not std::size_t. | |
| using | difference_type = std::ptrdiff_t |
| Iterator distance type. | |
| using | reference = value_type& |
| Mutable entry reference. | |
| using | const_reference = const value_type& |
| Read-only entry reference. | |
| using | iterator = BasicIterator<false> |
| Mutable iterator. | |
| using | const_iterator = BasicIterator<true> |
| Read-only iterator. | |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| Mutable reverse iterator. | |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
| Read-only reverse iterator. | |
| using | insert_result = Pair<iterator, bool> |
| Iterator to the entry and whether it was inserted. | |
| using | equal_range_result = Pair<iterator, iterator> |
| Lower and upper bound. | |
| using | const_equal_range_result = Pair<const_iterator, const_iterator> |
| Read-only lower and upper bound. | |
Public Member Functions | |
| Map () | |
| Construct an empty map. | |
| Map (const Compare &compare) | |
| Construct an empty map with a comparator. | |
| Map (const Map &other) | |
| Copy every node into new Base blocks. | |
| Map (Map &&other) | |
| Take the tree. | |
| STORMBYTE_FORCE_INLINE | Map (const std::map< K, V, Compare > &other) |
| Copy a caller-owned STL map. | |
| STORMBYTE_FORCE_INLINE | Map (std::map< K, V, Compare > &&other) |
| Move elements from a caller-owned STL map and leave it empty. | |
| template<std::ranges::input_range R> requires std::convertible_to<std::ranges::range_reference_t<R>, value_type> | |
| STORMBYTE_FORCE_INLINE | Map (std::from_range_t, R &&range) |
Copy the entries of range. | |
| Map (std::initializer_list< value_type > values) | |
| Insert every entry of an initializer list. | |
| ~Map () noexcept | |
| Destroy every node through Base. | |
| Map & | operator= (const Map &other) |
| Copy-assign. | |
| Map & | operator= (Map &&other) noexcept |
| Move-assign. | |
| STORMBYTE_FORCE_INLINE Map & | operator= (const std::map< K, V, Compare > &other) |
| Copy-assign a caller-owned STL map. | |
| STORMBYTE_FORCE_INLINE Map & | operator= (std::map< K, V, Compare > &&other) |
| Move-assign elements from a caller-owned STL map and leave it empty. | |
| Map & | operator= (std::initializer_list< value_type > values) |
| Replace the contents with an initializer list. | |
| key_compare | key_comp () const |
| Return the key ordering. | |
| value_compare | value_comp () const |
| Return an entry comparator that uses the key ordering. | |
| iterator | begin () noexcept |
| Return a mutable iterator to the first entry. | |
| iterator | end () noexcept |
| Return the mutable end iterator. | |
| const_iterator | begin () const noexcept |
| Return a read-only iterator to the first entry. | |
| const_iterator | end () const noexcept |
| Return the read-only end iterator. | |
| const_iterator | cbegin () const noexcept |
| Return a read-only iterator to the first entry. | |
| const_iterator | cend () const noexcept |
| Return the read-only end iterator. | |
| reverse_iterator | rbegin () noexcept |
| Return a reverse iterator to the last entry. | |
| reverse_iterator | rend () noexcept |
| Return the reverse end iterator. | |
| const_reverse_iterator | rbegin () const noexcept |
| Return a read-only reverse iterator to the last entry. | |
| const_reverse_iterator | rend () const noexcept |
| Return the read-only reverse end iterator. | |
| const_reverse_iterator | crbegin () const noexcept |
| Return a read-only reverse iterator to the last entry. | |
| const_reverse_iterator | crend () const noexcept |
| Return the read-only reverse end iterator. | |
| bool | empty () const noexcept |
| Test whether the map has no entries. | |
| size_type | size () const noexcept |
| Return the entry count. | |
| size_type | max_size () const noexcept |
| Return the largest representable entry count. | |
| void | clear () noexcept |
| Destroy every node. | |
| void | swap (Map &other) noexcept |
| Exchange trees. | |
| insert_result | insert (const value_type &entry) |
| Insert a copy of an entry. | |
| insert_result | insert (value_type &&entry) |
| Insert a moved entry. | |
| iterator | insert (const_iterator hint, const value_type &entry) |
Insert a copy of an entry, using hint when the neighbouring keys confirm it. | |
| iterator | insert (const_iterator hint, value_type &&entry) |
Insert a moved entry, using hint when the neighbouring keys confirm it. | |
| template<class P> requires Type::ConstructibleFrom<typename Map<K, V, Compare>::value_type, P> && (!Type::SameAs<std::remove_cvref_t<P>, typename Map<K, V, Compare>::value_type>) | |
| insert_result | insert (P &&entry) |
| Insert an entry constructed from a compatible value. | |
| template<class InputIt> | |
| STORMBYTE_FORCE_INLINE void | insert (InputIt first, InputIt last) |
| Insert every entry in [first, last). | |
| void | insert (std::initializer_list< value_type > values) |
| Insert every entry of an initializer list. | |
| template<std::ranges::input_range R> requires std::convertible_to<std::ranges::range_reference_t<R>, value_type> | |
| STORMBYTE_FORCE_INLINE void | insert_range (R &&range) |
Insert a copy of range. | |
| template<class... Args> | |
| insert_result | try_emplace (const K &key, Args &&... args) |
| Construct an entry in a new node if the key is absent. | |
| template<class... Args> | |
| insert_result | try_emplace (K &&key, Args &&... args) |
| Construct an entry in a new node if the key is absent. | |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, const K &key, Args &&... args) |
Construct an entry if the key is absent, using hint when the neighbouring keys confirm it. | |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, K &&key, Args &&... args) |
Construct an entry if the key is absent, using hint when the neighbouring keys confirm it. | |
| template<class... Args> | |
| insert_result | emplace (Args &&... args) |
| Construct an entry from arguments forwarded to value_type. | |
| template<class... Args> | |
| iterator | emplace_hint (const_iterator hint, Args &&... args) |
Construct an entry from arguments, using hint when the neighbouring keys confirm it. | |
| insert_result | insert_or_assign (const K &key, const V &value) |
| Insert or replace the mapped value. | |
| insert_result | insert_or_assign (const K &key, V &&value) |
| Insert or replace the mapped value. | |
| insert_result | insert_or_assign (K &&key, const V &value) |
| Insert or replace the mapped value. | |
| insert_result | insert_or_assign (K &&key, V &&value) |
| Insert or replace the mapped value. | |
| iterator | insert_or_assign (const_iterator hint, const K &key, const V &value) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it. | |
| iterator | insert_or_assign (const_iterator hint, const K &key, V &&value) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it. | |
| iterator | insert_or_assign (const_iterator hint, K &&key, const V &value) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it. | |
| iterator | insert_or_assign (const_iterator hint, K &&key, V &&value) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it. | |
| insert_return_type | insert (node_type &&handle) |
| Insert an extracted node if its key is absent. | |
| iterator | insert (const_iterator hint, node_type &&handle) |
Insert an extracted node, using hint when the neighbouring keys confirm it. | |
| node_type | extract (const_iterator position) |
Unlink the entry at position and return that node. | |
| node_type | extract (const K &key) |
Unlink the entry with key and return that node. | |
| template<class OtherCompare> | |
| void | merge (Map< K, V, OtherCompare > &source) |
Move unique keys from source into this map. | |
| iterator | erase (iterator position) noexcept |
| Erase the entry at an iterator. | |
| iterator | erase (const_iterator position) noexcept |
| Erase the entry at a read-only iterator. | |
| iterator | erase (const_iterator first, const_iterator last) noexcept |
| Erase a half-open range. | |
| size_type | erase (const K &key) noexcept |
| Erase the entry with a key. | |
| iterator | find (const K &key) noexcept |
| Find an entry. | |
| const_iterator | find (const K &key) const noexcept |
| Find an entry. | |
| bool | contains (const K &key) const noexcept |
| Test whether a key is present. | |
| size_type | count (const K &key) const noexcept |
| Return the number of entries with a key. | |
| iterator | lower_bound (const K &key) noexcept |
| Return the first entry not less than a key. | |
| const_iterator | lower_bound (const K &key) const noexcept |
| Return the first entry not less than a key. | |
| iterator | upper_bound (const K &key) noexcept |
| Return the first entry greater than a key. | |
| const_iterator | upper_bound (const K &key) const noexcept |
| Return the first entry greater than a key. | |
| equal_range_result | equal_range (const K &key) noexcept |
| Return the equal range of a key. | |
| const_equal_range_result | equal_range (const K &key) const noexcept |
| Return the equal range of a key. | |
| V & | operator[] (const K &key) |
| Return the mapped value, inserting a value-initialized one if absent. | |
| V & | operator[] (K &&key) |
| Return the mapped value, inserting a value-initialized one if absent. | |
| V & | at (const K &key) |
| Return the mapped value. | |
| const V & | at (const K &key) const |
| Return the mapped value. | |
| bool | operator== (const Map &other) const |
| Compare entries in order. | |
| STORMBYTE_FORCE_INLINE std::strong_ordering | operator<=> (const Map &other) const |
| Order maps lexicographically by key, then mapped value. | |
| bool | operator< (const Map &other) const |
| Order maps lexicographically. | |
| bool | operator<= (const Map &other) const |
| Order maps lexicographically. | |
| bool | operator> (const Map &other) const |
| Order maps lexicographically. | |
| bool | operator>= (const Map &other) const |
| Order maps lexicographically. | |
| STORMBYTE_FORCE_INLINE | operator std::map< K, V, Compare > () const |
| Copy the entries into caller-owned STL storage. | |
Ordered unique-key map stored on Base's heap.
| K | Safe key type. |
| V | Safe mapped type. |
| Compare | Strict weak ordering. A stateless comparator does not allocate. A stateful one is stored in the map object and must itself be Safe. |
Nodes are allocated with Heap::Allocate. Iterators point at those nodes. Dereference returns a real Pair reference, so the map is a bidirectional range. Public results are Pair, never std::pair. node_type owns a Base node. It is not std::map::node_type. extract unlinks that node. It does not copy it. There is no allocator.
| using StormByte::Safe::Map< K, V, Compare >::const_equal_range_result = Pair<const_iterator, const_iterator> |
Read-only lower and upper bound.
| using StormByte::Safe::Map< K, V, Compare >::const_iterator = BasicIterator<true> |
Read-only iterator.
| using StormByte::Safe::Map< K, V, Compare >::const_reference = const value_type& |
Read-only entry reference.
| using StormByte::Safe::Map< K, V, Compare >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Read-only reverse iterator.
| using StormByte::Safe::Map< K, V, Compare >::difference_type = std::ptrdiff_t |
Iterator distance type.
| using StormByte::Safe::Map< K, V, Compare >::equal_range_result = Pair<iterator, iterator> |
Lower and upper bound.
| using StormByte::Safe::Map< K, V, Compare >::insert_result = Pair<iterator, bool> |
Iterator to the entry and whether it was inserted.
| using StormByte::Safe::Map< K, V, Compare >::iterator = BasicIterator<false> |
Mutable iterator.
| using StormByte::Safe::Map< K, V, Compare >::key_compare = Compare |
Key ordering.
| using StormByte::Safe::Map< K, V, Compare >::key_type = K |
Key type.
| using StormByte::Safe::Map< K, V, Compare >::mapped_type = V |
Mapped type.
| using StormByte::Safe::Map< K, V, Compare >::reference = value_type& |
Mutable entry reference.
| using StormByte::Safe::Map< K, V, Compare >::reverse_iterator = std::reverse_iterator<iterator> |
Mutable reverse iterator.
| using StormByte::Safe::Map< K, V, Compare >::size_type = Size |
Element count. Size, not std::size_t.
| using StormByte::Safe::Map< K, V, Compare >::value_type = Pair<const K, V> |
Entry type. The key is immutable.
| StormByte::Safe::Map< K, V, Compare >::Map | ( | ) |
Construct an empty map.
| AllocationError | The sentinel could not be allocated. |
|
explicit |
Construct an empty map with a comparator.
| compare | Key ordering. |
| AllocationError | The sentinel could not be allocated. |
| StormByte::Safe::Map< K, V, Compare >::Map | ( | const Map< K, V, Compare > & | other | ) |
Copy every node into new Base blocks.
| other | Source. |
| AllocationError | A node could not be allocated. |
| StormByte::Safe::Map< K, V, Compare >::Map | ( | Map< K, V, Compare > && | other | ) |
Take the tree.
other is left empty.
| other | Source. |
| AllocationError | The replacement sentinel could not be allocated; the source is unchanged. |
|
inlineexplicit |
Copy a caller-owned STL map.
Its state is unchanged.
| other | Source. |
| AllocationError | A node could not be allocated. |
|
inlineexplicit |
Move elements from a caller-owned STL map and leave it empty.
| other | Source. Cleared before this function returns. |
| AllocationError | A node could not be allocated. |
|
inlineexplicit |
Copy the entries of range.
| R | Input range of value_type. |
| range | Source. Instantiated in the caller. |
| AllocationError | A node could not be allocated. |
| StormByte::Safe::Map< K, V, Compare >::Map | ( | std::initializer_list< value_type > | values | ) |
Insert every entry of an initializer list.
| values | Entries. |
| AllocationError | A node could not be allocated. |
|
noexcept |
Destroy every node through Base.
| V & StormByte::Safe::Map< K, V, Compare >::at | ( | const K & | key | ) |
Return the mapped value.
| key | Lookup key. |
| OutOfBoundsError | The key is absent. There is no numeric bound, so the error carries no index. |
| const V & StormByte::Safe::Map< K, V, Compare >::at | ( | const K & | key | ) | const |
Return the mapped value.
| key | Lookup key. |
| OutOfBoundsError | The key is absent. There is no numeric bound, so the error carries no index. |
|
noexcept |
Return a read-only iterator to the first entry.
|
noexcept |
Return a mutable iterator to the first entry.
|
noexcept |
Return a read-only iterator to the first entry.
|
noexcept |
Return the read-only end iterator.
|
noexcept |
Destroy every node.
|
noexcept |
|
noexcept |
Return the number of entries with a key.
| key | Lookup key. |
|
inlinenoexcept |
Return a read-only reverse iterator to the last entry.
|
inlinenoexcept |
Return the read-only reverse end iterator.
| insert_result StormByte::Safe::Map< K, V, Compare >::emplace | ( | Args &&... | args | ) |
Construct an entry from arguments forwarded to value_type.
| Args | Entry constructor argument types. |
| args | Arguments forwarded to value_type. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::emplace_hint | ( | const_iterator | hint, |
| Args &&... | args ) |
Construct an entry from arguments, using hint when the neighbouring keys confirm it.
| Args | Entry constructor argument types. |
| hint | Suggested position. |
| args | Arguments forwarded to value_type. |
| AllocationError | The node could not be allocated. |
|
inlinenoexcept |
Test whether the map has no entries.
|
noexcept |
Return the read-only end iterator.
|
noexcept |
Return the mutable end iterator.
|
noexcept |
Return the equal range of a key.
| key | Lookup key. |
|
noexcept |
Return the equal range of a key.
| key | Lookup key. |
|
noexcept |
Erase the entry with a key.
| key | Lookup key. |
|
noexcept |
Erase a half-open range.
| first | First entry to erase. |
| last | Past-the-end entry. |
|
noexcept |
Erase the entry at a read-only iterator.
| position | Entry to erase. |
|
noexcept |
Erase the entry at an iterator.
| position | Entry to erase. |
| node_type StormByte::Safe::Map< K, V, Compare >::extract | ( | const K & | key | ) |
Unlink the entry with key and return that node.
| key | Lookup key. |
| node_type StormByte::Safe::Map< K, V, Compare >::extract | ( | const_iterator | position | ) |
Unlink the entry at position and return that node.
| position | Entry to extract. |
position is end.
|
noexcept |
Find an entry.
| key | Lookup key. |
|
noexcept |
Find an entry.
| key | Lookup key. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert | ( | const value_type & | entry | ) |
Insert a copy of an entry.
| entry | Entry to insert. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert | ( | const_iterator | hint, |
| const value_type & | entry ) |
Insert a copy of an entry, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| entry | Entry to insert. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert | ( | const_iterator | hint, |
| node_type && | handle ) |
Insert an extracted node, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| handle | Node. Emptied when inserted. |
handle was empty. | iterator StormByte::Safe::Map< K, V, Compare >::insert | ( | const_iterator | hint, |
| value_type && | entry ) |
Insert a moved entry, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| entry | Entry to insert. |
| AllocationError | The node could not be allocated. |
|
inline |
Insert every entry in [first, last).
| InputIt | Input iterator of entries. |
| first | Start. |
| last | End. |
| AllocationError | A node could not be allocated. |
| insert_return_type StormByte::Safe::Map< K, V, Compare >::insert | ( | node_type && | handle | ) |
Insert an extracted node if its key is absent.
The same node is linked.
| handle | Node. Emptied when inserted. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert | ( | P && | entry | ) |
Insert an entry constructed from a compatible value.
| P | Source type. value_type must be constructible from it. |
| entry | Source entry. |
| AllocationError | The node could not be allocated. |
| void StormByte::Safe::Map< K, V, Compare >::insert | ( | std::initializer_list< value_type > | values | ) |
Insert every entry of an initializer list.
| values | Entries. |
| AllocationError | A node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert | ( | value_type && | entry | ) |
Insert a moved entry.
| entry | Entry to insert. |
| AllocationError | The node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const K & | key, |
| const V & | value ) |
Insert or replace the mapped value.
| key | Lookup key. |
| value | Replacement value. |
| AllocationError | The node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const K & | key, |
| V && | value ) |
Insert or replace the mapped value.
| key | Lookup key. |
| value | Replacement value, moved when assigned. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const_iterator | hint, |
| const K & | key, | ||
| const V & | value ) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| key | Lookup key. |
| value | Replacement value. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const_iterator | hint, |
| const K & | key, | ||
| V && | value ) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| key | Lookup key. |
| value | Replacement value, moved when assigned. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const_iterator | hint, |
| K && | key, | ||
| const V & | value ) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| key | Lookup key, moved when inserted. |
| value | Replacement value. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | const_iterator | hint, |
| K && | key, | ||
| V && | value ) |
Insert or replace the mapped value, using hint when the neighbouring keys confirm it.
| hint | Suggested position. |
| key | Lookup key, moved when inserted. |
| value | Replacement value, moved when assigned. |
| AllocationError | The node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | K && | key, |
| const V & | value ) |
Insert or replace the mapped value.
| key | Lookup key, moved when inserted. |
| value | Replacement value. |
| AllocationError | The node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::insert_or_assign | ( | K && | key, |
| V && | value ) |
Insert or replace the mapped value.
| key | Lookup key, moved when inserted. |
| value | Replacement value, moved when assigned. |
| AllocationError | The node could not be allocated. |
|
inline |
Insert a copy of range.
| R | Input range of entries. |
| range | Source. Instantiated in the caller. |
| AllocationError | A node could not be allocated. |
|
inline |
Return the key ordering.
|
noexcept |
Return the first entry not less than a key.
| key | Lookup key. |
|
noexcept |
Return the first entry not less than a key.
| key | Lookup key. |
|
inlinenoexcept |
Return the largest representable entry count.
| void StormByte::Safe::Map< K, V, Compare >::merge | ( | Map< K, V, OtherCompare > & | source | ) |
Move unique keys from source into this map.
The node is transferred, not copied.
| OtherCompare | Source ordering. |
| source | Map to drain. Entries whose key is already present stay in source. |
|
inlineexplicit |
Copy the entries into caller-owned STL storage.
| bool StormByte::Safe::Map< K, V, Compare >::operator< | ( | const Map< K, V, Compare > & | other | ) | const |
Order maps lexicographically.
| other | Map to compare. |
other. | bool StormByte::Safe::Map< K, V, Compare >::operator<= | ( | const Map< K, V, Compare > & | other | ) | const |
Order maps lexicographically.
| other | Map to compare. |
other. | STORMBYTE_FORCE_INLINE std::strong_ordering StormByte::Safe::Map< K, V, Compare >::operator<=> | ( | const Map< K, V, Compare > & | other | ) | const |
Order maps lexicographically by key, then mapped value.
| other | Map to compare. |
| Map & StormByte::Safe::Map< K, V, Compare >::operator= | ( | const Map< K, V, Compare > & | other | ) |
Copy-assign.
The previous tree is released only after the copy exists.
| other | Source. |
| AllocationError | A node could not be allocated. |
|
inline |
Copy-assign a caller-owned STL map.
Its state is unchanged.
| other | Source. |
| AllocationError | A node could not be allocated. |
|
noexcept |
Move-assign.
other is left empty.
| other | Source. |
| Map & StormByte::Safe::Map< K, V, Compare >::operator= | ( | std::initializer_list< value_type > | values | ) |
Replace the contents with an initializer list.
| values | Entries. |
| AllocationError | A node could not be allocated. |
|
inline |
Move-assign elements from a caller-owned STL map and leave it empty.
| other | Source. Cleared before this function returns. |
| AllocationError | A node could not be allocated. |
| bool StormByte::Safe::Map< K, V, Compare >::operator== | ( | const Map< K, V, Compare > & | other | ) | const |
Compare entries in order.
| other | Map to compare. |
| bool StormByte::Safe::Map< K, V, Compare >::operator> | ( | const Map< K, V, Compare > & | other | ) | const |
Order maps lexicographically.
| other | Map to compare. |
other. | bool StormByte::Safe::Map< K, V, Compare >::operator>= | ( | const Map< K, V, Compare > & | other | ) | const |
Order maps lexicographically.
| other | Map to compare. |
other. | V & StormByte::Safe::Map< K, V, Compare >::operator[] | ( | const K & | key | ) |
Return the mapped value, inserting a value-initialized one if absent.
| key | Lookup key. |
| AllocationError | The node could not be allocated. |
| V & StormByte::Safe::Map< K, V, Compare >::operator[] | ( | K && | key | ) |
Return the mapped value, inserting a value-initialized one if absent.
| key | Lookup key, moved when inserted. |
| AllocationError | The node could not be allocated. |
|
inlinenoexcept |
Return a read-only reverse iterator to the last entry.
|
inlinenoexcept |
Return a reverse iterator to the last entry.
|
inlinenoexcept |
Return the read-only reverse end iterator.
|
inlinenoexcept |
Return the reverse end iterator.
|
inlinenoexcept |
Return the entry count.
|
noexcept |
| insert_result StormByte::Safe::Map< K, V, Compare >::try_emplace | ( | const K & | key, |
| Args &&... | args ) |
Construct an entry in a new node if the key is absent.
| Args | Mapped constructor argument types. |
| key | Lookup key. |
| args | Arguments forwarded to V. None value-initializes V. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::try_emplace | ( | const_iterator | hint, |
| const K & | key, | ||
| Args &&... | args ) |
Construct an entry if the key is absent, using hint when the neighbouring keys confirm it.
| Args | Mapped constructor argument types. |
| hint | Suggested position. |
| key | Lookup key. |
| args | Arguments forwarded to V. |
| AllocationError | The node could not be allocated. |
| iterator StormByte::Safe::Map< K, V, Compare >::try_emplace | ( | const_iterator | hint, |
| K && | key, | ||
| Args &&... | args ) |
Construct an entry if the key is absent, using hint when the neighbouring keys confirm it.
| Args | Mapped constructor argument types. |
| hint | Suggested position. |
| key | Lookup key, moved when inserted. |
| args | Arguments forwarded to V. |
| AllocationError | The node could not be allocated. |
| insert_result StormByte::Safe::Map< K, V, Compare >::try_emplace | ( | K && | key, |
| Args &&... | args ) |
Construct an entry in a new node if the key is absent.
| Args | Mapped constructor argument types. |
| key | Lookup key, moved when inserted. |
| args | Arguments forwarded to V. |
| AllocationError | The node could not be allocated. |
|
noexcept |
Return the first entry greater than a key.
| key | Lookup key. |
|
noexcept |
Return the first entry greater than a key.
| key | Lookup key. |
|
inline |
Return an entry comparator that uses the key ordering.