diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-23 17:33:47 +0000 |
commit | cc6313b23cac25eb05976b6cf64f96faf1ed4163 (patch) | |
tree | 3dc28060ad25b43773e875bea7388ab1cefcd927 /utils/hash.h | |
parent | 7990c750829af93f0a1e0fc14534582f52ee9e8c (diff) | |
parent | f2fb69b10a897e8beb4e6e6d6cbb4327096235ef (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'utils/hash.h')
-rw-r--r-- | utils/hash.h | 12 |
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) |