[flang] Fix error compiling std::min on macos

On macos, `size_t` is `unsigned long` while `size_t - int64_t` is
`unsigned long long` so std::min requires an explicit type to compile.

Differential Revision: https://reviews.llvm.org/D99340
This commit is contained in:
Tim Keith 2021-03-25 11:18:39 -07:00
parent aa979084df
commit 61a55c8812
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ public:
static_cast<int>(at), static_cast<int>(minBytes),
static_cast<int>(maxBytes));
}
auto result{std::min(maxBytes, bytes_ - at)};
auto result{std::min<std::size_t>(maxBytes, bytes_ - at)};
std::memcpy(to, &data_[at], result);
expect_ = at + result;
return result;