diff options
Diffstat (limited to 'src/context/cdinsert_hashmap.h')
-rw-r--r-- | src/context/cdinsert_hashmap.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/context/cdinsert_hashmap.h b/src/context/cdinsert_hashmap.h index 009fed99a..62268b471 100644 --- a/src/context/cdinsert_hashmap.h +++ b/src/context/cdinsert_hashmap.h @@ -54,11 +54,11 @@ namespace context { template <class Key, class Data, class HashFcn = std::hash<Key> > class InsertHashMap { private: - typedef std::deque<Key> KeyVec; + using KeyVec = std::deque<Key>; /** A list of the keys in the map maintained as a stack. */ KeyVec d_keys; - typedef std::unordered_map<Key, Data, HashFcn> HashMap; + using HashMap = std::unordered_map<const Key, const Data, HashFcn>; /** The hash_map used for element lookup. */ HashMap d_hashMap; @@ -73,6 +73,8 @@ public: /**An iterator over the elements in the hash_map. */ typedef typename HashMap::const_iterator const_iterator; + // The type of the <Key, Data> values in the hashmap. + using value_type = typename HashMap::value_type; /** * Returns an iterator to the begining of the HashMap. @@ -289,6 +291,9 @@ public: */ typedef typename IHM::key_iterator key_iterator; + // The type of the <key, data> values in the hashmap. + using value_type = typename IHM::value_type; + /** Returns true if the map is empty in the current context. */ bool empty() const{ return d_size == 0; |