mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 05:54:29 +02:00
Remove the _fpclass code from floating point hash.
[SVN r42416]
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
// STLport
|
// STLport
|
||||||
#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||||
// _fpclass and fpclassify aren't good enough on STLport.
|
// fpclassify aren't good enough on STLport.
|
||||||
|
|
||||||
// GNU libstdc++ 3
|
// GNU libstdc++ 3
|
||||||
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||||
@@ -50,12 +50,7 @@
|
|||||||
// Dinkumware Library, on Visual C++
|
// Dinkumware Library, on Visual C++
|
||||||
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||||
|
|
||||||
// Not using _fpclass because it causes a warning about a conversion
|
// Not using _fpclass because it is only available for double.
|
||||||
// from 'long double' to 'double'. Pity.
|
|
||||||
//
|
|
||||||
//# if defined(BOOST_MSVC)
|
|
||||||
//# define BOOST_HASH_USE_FPCLASS
|
|
||||||
//# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -160,28 +155,6 @@ namespace boost
|
|||||||
BOOST_ASSERT(0);
|
BOOST_ASSERT(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#elif defined(BOOST_HASH_USE_FPCLASS)
|
|
||||||
switch(_fpclass(v)) {
|
|
||||||
case _FPCLASS_NZ:
|
|
||||||
case _FPCLASS_PZ:
|
|
||||||
return 0;
|
|
||||||
case _FPCLASS_PINF:
|
|
||||||
return (std::size_t)(-1);
|
|
||||||
case _FPCLASS_NINF:
|
|
||||||
return (std::size_t)(-2);
|
|
||||||
case _FPCLASS_SNAN:
|
|
||||||
case _FPCLASS_QNAN:
|
|
||||||
return (std::size_t)(-3);
|
|
||||||
case _FPCLASS_NN:
|
|
||||||
case _FPCLASS_ND:
|
|
||||||
return float_hash_impl(v);
|
|
||||||
case _FPCLASS_PD:
|
|
||||||
case _FPCLASS_PN:
|
|
||||||
return float_hash_impl(v);
|
|
||||||
default:
|
|
||||||
BOOST_ASSERT(0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
return v == 0 ? 0 : float_hash_impl(v);
|
return v == 0 ? 0 : float_hash_impl(v);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user