Added Absl hash guards

This commit is contained in:
madisetti
2020-05-19 19:21:16 -04:00
parent 5c908d03bb
commit 80e86220ab
2 changed files with 11 additions and 5 deletions
+9 -3
View File
@@ -33,6 +33,13 @@
#include <tuple>
#include "phmap_bits.h"
// ---------------------------------------------------------------
// Absl forward declaration requires global scope.
// ---------------------------------------------------------------
#if defined(PHMAP_USE_ABSL_HASH) && !defined(phmap_fwd_decl_h_guard_) && !defined(ABSL_HASH_HASH_H_)
namespace absl { template <class T> struct Hash; };
#endif
namespace phmap
{
@@ -132,9 +139,8 @@ public:
};
#if defined(PHMAP_USE_ABSL_HASH) && !defined(phmap_fwd_decl_h_guard_)
namespace absl { template <class T> struct Hash; };
template <class T> using Hash = absl::Hash<T>;
#else
template <class T> using Hash = ::absl::Hash<T>;
#elif !defined(PHMAP_USE_ABSL_HASH)
// ---------------------------------------------------------------
// phmap::Hash
// ---------------------------------------------------------------