Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-01-02 13:08:43


Author: danieljames
Date: 2008-01-02 13:08:43 EST (Wed, 02 Jan 2008)
New Revision: 42416
URL: http://svn.boost.org/trac/boost/changeset/42416

Log:
Remove the _fpclass code from floating point hash.
Text files modified:
   trunk/boost/functional/detail/hash_float.hpp | 31 ++-----------------------------
   1 files changed, 2 insertions(+), 29 deletions(-)

Modified: trunk/boost/functional/detail/hash_float.hpp
==============================================================================
--- trunk/boost/functional/detail/hash_float.hpp (original)
+++ trunk/boost/functional/detail/hash_float.hpp 2008-01-02 13:08:43 EST (Wed, 02 Jan 2008)
@@ -38,7 +38,7 @@
 
 // STLport
 #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
 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
@@ -50,12 +50,7 @@
 // Dinkumware Library, on Visual C++
 #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
 
-// Not using _fpclass because it causes a warning about a conversion
-// from 'long double' to 'double'. Pity.
-//
-//# if defined(BOOST_MSVC)
-//# define BOOST_HASH_USE_FPCLASS
-//# endif
+// Not using _fpclass because it is only available for double.
 
 #endif
 
@@ -160,28 +155,6 @@
                 BOOST_ASSERT(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
             return v == 0 ? 0 : float_hash_impl(v);
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk