Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-11-10 19:56:39 +0100
committerMartin Hořeňovský2017-11-10 19:56:39 +0100
commita0dbc62955a1b642d4ab2df9948bcbe4e7da4cc4 (patch)
tree970a5d72d2e2dd54af10df93b21b96059e40bbea
parentcecee3459ac4fbcb6c77c8d38ac817dd48d294b8 (diff)
downloadcatch3-a0dbc62955a1b642d4ab2df9948bcbe4e7da4cc4.tar.gz
Fix OS X compilation error
-rw-r--r--include/internal/catch_matchers_floating.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/include/internal/catch_matchers_floating.cpp b/include/internal/catch_matchers_floating.cpp
index a7c86e44..fb5f8d6a 100644
--- a/include/internal/catch_matchers_floating.cpp
+++ b/include/internal/catch_matchers_floating.cpp
@@ -24,16 +24,6 @@ enum class FloatingPointKind : uint8_t {
}
namespace {
-union Float_t {
- Float_t(float num = 0.0f) : f(num) {}
- // Portable extraction of components.
- bool Negative() const { return i < 0; }
- int32_t RawMantissa() const { return i & ((1 << 23) - 1); }
- int32_t RawExponent() const { return (i >> 23) & 0xFF; }
-
- int32_t i;
- float f;
-};
template <typename T>
struct Converter;
@@ -77,7 +67,7 @@ bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
return lhs == rhs;
}
- auto ulpDiff = abs(lc.i - rc.i);
+ auto ulpDiff = std::abs(lc.i - rc.i);
return ulpDiff <= maxUlpDiff;
}