Skip to content

Commit

Permalink
[Issue 2154] Correct error when building with IBM's latest XLC compil…
Browse files Browse the repository at this point in the history
…er with xlclang++ front-end.

On AIX, the XLC 16.1.0.1 compiler considers the call to `std::abs` ambigious, so it needs help with a static_cast to the type of the template argument.
  • Loading branch information
datalogics-robb committed Jan 19, 2021
1 parent bed285a commit 75b17e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/internal/catch_matchers_floating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace {
return lhs == rhs;
}

auto ulpDiff = std::abs(lc - rc);
auto ulpDiff = std::abs(static_cast<FP>(lc - rc));
return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
}

Expand Down

0 comments on commit 75b17e1

Please sign in to comment.