summaryrefslogtreecommitdiff
path: root/utils/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hash.h')
-rw-r--r--utils/hash.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/hash.h b/utils/hash.h
index 189ed1ae..e1426ffb 100644
--- a/utils/hash.h
+++ b/utils/hash.h
@@ -20,11 +20,17 @@
# define HASH_MAP_RESERVED(h,empty,deleted) do { (h).set_empty_key(empty); (h).set_deleted_key(deleted); } while(0)
# define HASH_MAP_EMPTY(h,empty) do { (h).set_empty_key(empty); } while(0)
#else
+#ifndef HAVE_OLD_CPP
+# include <unordered_map>
+# include <unordered_set>
+#else
# include <tr1/unordered_map>
# include <tr1/unordered_set>
-# define SPARSE_HASH_MAP std::tr1::unordered_map
-# define HASH_MAP std::tr1::unordered_map
-# define HASH_SET std::tr1::unordered_set
+namespace std { using std::tr1::unordered_map; using std::tr1::unordered_set; }
+#endif
+# define SPARSE_HASH_MAP std::unordered_map
+# define HASH_MAP std::unordered_map
+# define HASH_SET std::unordered_set
# define HASH_MAP_DELETED(h,deleted)
# define HASH_MAP_RESERVED(h,empty,deleted)
# define HASH_MAP_EMPTY(h,empty)