From f2afc2a08dac667937870e8f7ca1c06547b492f4 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 17 Apr 2005 09:09:42 +0000 Subject: [PATCH] Another fix for the Borland hash array code, and get rid of my attempt at working around Borland problems with infinity and NaN in the hash float functions. It seems impossible to do anything with them. [SVN r28286] --- include/boost/functional/hash/hash.hpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index b77264e..bcb5530 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -211,8 +211,7 @@ namespace boost for(; first != last; ++first) { - T& x = *first; - hash_combine(seed, x); + hash_combine(seed, first[0]); } return seed; @@ -223,8 +222,7 @@ namespace boost { for(; first != last; ++first) { - T const& x = *first; - hash_combine(seed, x); + hash_combine(seed, first[0]); } } #endif @@ -259,15 +257,6 @@ namespace boost template inline std::size_t float_hash_value(T v) { -#if defined(__BORLAND__) - if(v == std::numeric_limits::quiet_NaN()) - return 0; - if(v == std::numeric_limits::infinity()) - return 1; - if(v == -std::numeric_limits::infinity()) - return 2; -#endif - int exp; v = boost::hash_detail::call_frexp(v, &exp);