Template Function common::getValuePtr(std::unordered_map<KeyType, ValueType, Hash<KeyType>, Comparator<KeyType>, Allocator<std::pair<const KeyType, ValueType>>>&, const KeyType&)

Function Documentation

template<typename KeyType, typename ValueType, template<typename> class Hash, template<typename> class Comparator, template<typename> class Allocator>
inline ValueType *common::getValuePtr(std::unordered_map<KeyType, ValueType, Hash<KeyType>, Comparator<KeyType>, Allocator<std::pair<const KeyType, ValueType>>> &map, const KeyType &key)

Returns a non-const pointer to the value for the specified key in an std::unordered_map.

Returns nullptr if the key doesn’t exists.