From 21e1d582ecbb92f62f4a23a338b0455b2ebe5538 Mon Sep 17 00:00:00 2001 From: Tim King Date: Thu, 26 Jul 2018 13:55:53 -0700 Subject: [PATCH] Changing CDInsertHashMap to store pairs. This is in preparation for adding map utility functions. (#2209) --- src/context/cdinsert_hashmap.h | 9 +++++++-- 1 file 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 InsertHashMap { private: - typedef std::deque KeyVec; + using KeyVec = std::deque; /** A list of the keys in the map maintained as a stack. */ KeyVec d_keys; - typedef std::unordered_map HashMap; + using HashMap = std::unordered_map; /** 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 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 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; -- 2.30.2