<windows.h> defines macros named min and max in conflict with
<algorithm>. Prevent macro expansion by wrapping std::min in
parenthesis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250383
91177308-0d34-0410-b5e6-
96231b3b80d8
if (BytesLeftToReadInStream == 0)
break;
- uint32_t BytesToReadInBlock =
- std::min(BytesLeftToReadInStream, static_cast<uint32_t>(SB->BlockSize));
+ uint32_t BytesToReadInBlock = (std::min)(
+ BytesLeftToReadInStream, static_cast<uint32_t>(SB->BlockSize));
auto StreamBlockData =
StringRef(M.getBufferStart() + StreamBlockOffset, BytesToReadInBlock);
if (auto EC = checkOffset(M, StreamBlockData))