diff --git a/googlemock/test/gmock-matchers-arithmetic_test.cc b/googlemock/test/gmock-matchers-arithmetic_test.cc index a4c1def6..36c2bf02 100644 --- a/googlemock/test/gmock-matchers-arithmetic_test.cc +++ b/googlemock/test/gmock-matchers-arithmetic_test.cc @@ -41,6 +41,8 @@ #include "test/gmock-matchers_test.h" +#include + namespace testing { namespace gmock_matchers_test { namespace { @@ -1037,7 +1039,7 @@ class FloatingPointTest : public testing::Test { Floating::ReinterpretBits(infinity_bits_ - max_ulps_)), further_from_infinity_( Floating::ReinterpretBits(infinity_bits_ - max_ulps_ - 1)), - max_(Floating::Max()), + max_(std::numeric_limits::max()), nan1_(Floating::ReinterpretBits(Floating::kExponentBitMask | 1)), nan2_(Floating::ReinterpretBits(Floating::kExponentBitMask | 200)) {} diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 3121d428..e1eb2b51 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -307,9 +307,6 @@ class FloatingPoint { // Returns the floating-point number that represent positive infinity. static RawType Infinity() { return ReinterpretBits(kExponentBitMask); } - // Returns the maximum representable finite floating-point number. - static RawType Max(); - // Non-static methods // Returns the bits that represents this number. @@ -390,17 +387,6 @@ class FloatingPoint { FloatingPointUnion u_; }; -// We cannot use std::numeric_limits::max() as it clashes with the max() -// macro defined by . -template <> -inline float FloatingPoint::Max() { - return FLT_MAX; -} -template <> -inline double FloatingPoint::Max() { - return DBL_MAX; -} - // Typedefs the instances of the FloatingPoint template class that we // care to use. typedef FloatingPoint Float;