From 6c56bb581e98010fbe617bb73f8e4d2d660bbf82 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Mon, 29 Jul 2019 16:35:07 +0800 Subject: [PATCH] Avoid building failures on the Windows platform When include `min/max` macro definition conflicts with `std::min/std::max` --- parallel_hashmap/phmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index 748c003..f5f5f41 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -1543,7 +1543,7 @@ public: } // bitor is a faster way of doing `max` here. We will round up to the next // power-of-2-minus-1, so bitor is good enough. - auto m = NormalizeCapacity(std::max(n, size())); + auto m = NormalizeCapacity((std::max)(n, size())); // n == 0 unconditionally rehashes as per the standard. if (n == 0 || m > capacity_) { resize(m);