From: Tim King Date: Thu, 26 Jul 2018 20:55:53 +0000 (-0700) Subject: Changing CDInsertHashMap to store pairs. This is in preparati... X-Git-Tag: cvc5-1.0.0~4858 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21e1d582ecbb92f62f4a23a338b0455b2ebe5538;p=cvc5.git Changing CDInsertHashMap to store pairs. This is in preparation for adding map utility functions. (#2209) --- 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;