Avoid building failures on the Windows platform

When include <Windows.h> `min/max` macro definition conflicts with `std::min/std::max`
This commit is contained in:
Force Charlie
2019-07-29 16:35:07 +08:00
parent 3c16c3aef6
commit 6c56bb581e
+1 -1
View File
@@ -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);