Fix use of std::max when Windows.h is imported.

This commit is contained in:
Chris 2015-11-27 20:06:41 +00:00 committed by Wouter van Oortmerssen
parent 671c9495d9
commit 1d457a0271
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ class vector_downward {
if (len > static_cast<size_t>(cur_ - buf_)) {
auto old_size = size();
auto largest_align = AlignOf<largest_scalar_t>();
reserved_ += std::max(len, growth_policy(reserved_));
reserved_ += (std::max)(len, growth_policy(reserved_));
// Round up to avoid undefined behavior from unaligned loads and stores.
reserved_ = (reserved_ + (largest_align - 1)) & ~(largest_align - 1);
auto new_buf = allocator_.allocate(reserved_);