diff --git a/examples/hash_std.h b/examples/hash_std.h index 660f5b4..1284bd2 100644 --- a/examples/hash_std.h +++ b/examples/hash_std.h @@ -1,7 +1,7 @@ #ifndef phmap_example_hash_std_ #define phmap_example_hash_std_ -#include // minimal header providing phmap::hash_combine +#include // minimal header providing phmap::HashState() #include using std::string; diff --git a/parallel_hashmap/phmap_utils.h b/parallel_hashmap/phmap_utils.h index dbc6c5a..336d585 100644 --- a/parallel_hashmap/phmap_utils.h +++ b/parallel_hashmap/phmap_utils.h @@ -19,12 +19,18 @@ // limitations under the License. // --------------------------------------------------------------------------- -#include +#if defined(__APPLE__) + // forward declaration of std::hash does not work on mac. It is not really supposed + // to work, I know, but it is nice to reduce the amount of headers included. + #include +#else + #include // for size_t -namespace std -{ - template struct hash; -} // namespace std + namespace std + { + template struct hash; + } +#endif namespace phmap {