forked from OSchip/llvm-project
[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:
parent
aa979084df
commit
61a55c8812
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue