mirror of
https://github.com/boostorg/functional.git
synced 2025-08-03 14:34:32 +02:00
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]
This commit is contained in:
@@ -211,8 +211,7 @@ namespace boost
|
|||||||
|
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
{
|
{
|
||||||
T& x = *first;
|
hash_combine(seed, first[0]);
|
||||||
hash_combine(seed, x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return seed;
|
return seed;
|
||||||
@@ -223,8 +222,7 @@ namespace boost
|
|||||||
{
|
{
|
||||||
for(; first != last; ++first)
|
for(; first != last; ++first)
|
||||||
{
|
{
|
||||||
T const& x = *first;
|
hash_combine(seed, first[0]);
|
||||||
hash_combine(seed, x);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -259,15 +257,6 @@ namespace boost
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline std::size_t float_hash_value(T v)
|
inline std::size_t float_hash_value(T v)
|
||||||
{
|
{
|
||||||
#if defined(__BORLAND__)
|
|
||||||
if(v == std::numeric_limits<double>::quiet_NaN())
|
|
||||||
return 0;
|
|
||||||
if(v == std::numeric_limits<double>::infinity())
|
|
||||||
return 1;
|
|
||||||
if(v == -std::numeric_limits<double>::infinity())
|
|
||||||
return 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int exp;
|
int exp;
|
||||||
v = boost::hash_detail::call_frexp(v, &exp);
|
v = boost::hash_detail::call_frexp(v, &exp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user