Skip to content
Snippets Groups Projects
Commit 61a55c88 authored by Tim Keith's avatar Tim Keith
Browse files

[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
parent aa979084
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment