template<class T, class R, class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
class ext::unordered_map< T, R, Hash, KeyEqual, Alloc >
Class extending the unordered_map class from the standard library. Original reason is to allow printing of the container with overloaded operator <<.
The class mimics the behavior of the unordered_map from the standatd library.
- Template Parameters
-
T | the type of keys inside the unordered_map |
R | the type of values inside the unordered_map |
Hash | the hasher type used to order keys |
KeyEqual | the comparator of keys |
Alloc | the allocator of values of type T |
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
template<class Iterator >
Constructor from range of values.
- Template Parameters
-
Iterator | the type of range iterator |
- Parameters
-
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Insert variant with explicit key and value parameters.
- Parameters
-
key | the key |
value | the value |
- Returns
- pair of iterator to inserted key-value pair and true if the value was inserted or false if the key already exited
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Insert variant with explicit key and value parameters.
- Parameters
-
key | the key |
value | the value |
- Returns
- pair of iterator to inserted key-value pair and true if the value was inserted or false if the key already exited
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Insert variant with explicit key and value parameters.
- Parameters
-
key | the key |
value | the value |
- Returns
- pair of iterator to inserted key-value pair and true if the value was inserted or false if the key already exited
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Insert variant with explicit key and value parameters.
- Parameters
-
key | the key |
value | the value |
- Returns
- pair of iterator to inserted key-value pair and true if the value was inserted or false if the key already exited
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Make range of non-const begin to end iterators.
- Returns
- full range over container values
template<class T , class R , class Hash = std::hash < T >, class KeyEqual = std::equal_to < T >, class Alloc = std::allocator < std::pair < const T, R > >>
Make range of non-const begin to end iterators.
- Returns
- full range over container values