Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / serialization / example / demo_dll_b.hpp
index 245ce37..0b3d102 100644 (file)
@@ -2,7 +2,7 @@
 #define BOOST_SERIALIZATION_TEST_B_HPP
 
 // MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
 # pragma once
 #endif
 
@@ -17,6 +17,7 @@
 //  See http://www.boost.org for updates, documentation, and revision history.
 
 #include <cstdlib> // for rand()
+#include <boost/math/special_functions/next.hpp>
 
 #include <boost/config.hpp>
 #if defined(BOOST_NO_STDC_NAMESPACE)
@@ -104,8 +105,8 @@ inline bool B::operator==(const B &rhs) const
         && t == rhs.t 
         && u == rhs.u 
         && v == rhs.v 
-        && std::fabs(w - rhs.w) <= std::numeric_limits<float>::round_error()
-        && std::fabs(x - rhs.x) <= std::numeric_limits<float>::round_error()
+        && std::abs( boost::math::float_distance(w, rhs.w)) < 2
+        && std::abs( boost::math::float_distance(x, rhs.x)) < 2
     ;
 }