summaryrefslogtreecommitdiff
path: root/src/context/cdhashmap.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2017-07-20 17:04:30 -0700
committerGitHub <noreply@github.com>2017-07-20 17:04:30 -0700
commit8b0659e6cd342ae40b676781b5e819d5fd2b3af7 (patch)
tree5ac55f64d115b3e8865ce8f691f38da65fc82a94 /src/context/cdhashmap.h
parent6d82ee2d1f84065ff4a86f688a3b671b85728f80 (diff)
Moving from the gnu extensions for hash maps to the c++11 hash maps
* Replacing __gnu_cxx::hash_map with std::unordered_map. * Replacing __gnu_cxx::hash_set with std::unordered_set. * Replacing __gnu_cxx::hash with std::hash. * Adding missing includes.
Diffstat (limited to 'src/context/cdhashmap.h')
-rw-r--r--src/context/cdhashmap.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/context/cdhashmap.h b/src/context/cdhashmap.h
index 575bde120..b6024b65d 100644
--- a/src/context/cdhashmap.h
+++ b/src/context/cdhashmap.h
@@ -15,7 +15,7 @@
** which must be saved and restored as contexts are pushed and
** popped. Requires that operator= be defined for the data class,
** and operator== for the key class. For key types that don't have a
- ** __gnu_cxx::hash<>, you should provide an explicit HashFcn.
+ ** std::hash<>, you should provide an explicit HashFcn.
**
** See also:
** CDInsertHashMap : An "insert-once" CD hash map.
@@ -82,8 +82,9 @@
#ifndef __CVC4__CONTEXT__CDHASHMAP_H
#define __CVC4__CONTEXT__CDHASHMAP_H
-#include <ext/hash_map>
+#include <functional>
#include <iterator>
+#include <unordered_map>
#include <vector>
#include "base/cvc4_assert.h"
@@ -95,7 +96,7 @@ namespace context {
// Auxiliary class: almost the same as CDO (see cdo.h)
-template <class Key, class Data, class HashFcn = __gnu_cxx::hash<Key> >
+template <class Key, class Data, class HashFcn = std::hash<Key> >
class CDOhash_map : public ContextObj {
friend class CDHashMap<Key, Data, HashFcn>;
@@ -268,7 +269,7 @@ template <class Key, class Data, class HashFcn>
class CDHashMap : public ContextObj {
typedef CDOhash_map<Key, Data, HashFcn> Element;
- typedef __gnu_cxx::hash_map<Key, Element*, HashFcn> table_type;
+ typedef std::unordered_map<Key, Element*, HashFcn> table_type;
friend class CDOhash_map<Key, Data, HashFcn>;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback