diff --git a/include/boost/container_hash/detail/limits.hpp b/include/boost/container_hash/detail/limits.hpp index 4a971a6..7890309 100644 --- a/include/boost/container_hash/detail/limits.hpp +++ b/include/boost/container_hash/detail/limits.hpp @@ -1,28 +1,11 @@ - // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// On some platforms std::limits gives incorrect values for long double. -// This tries to work around them. -#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) +#ifndef BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER #define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER -#include -#if defined(BOOST_HAS_PRAGMA_ONCE) -#pragma once -#endif - -#include - -// On OpenBSD, numeric_limits is not reliable for long doubles, but -// the macros defined in are and support long double when STLport -// doesn't. - -#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) -#include -#endif +#include namespace boost { @@ -30,33 +13,7 @@ namespace boost { template struct limits : std::numeric_limits {}; - -#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) - template <> - struct limits - : std::numeric_limits - { - static long double epsilon() { - return LDBL_EPSILON; - } - - static long double (max)() { - return LDBL_MAX; - } - - static long double (min)() { - return LDBL_MIN; - } - - BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); - BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); - BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); -#if defined(_STLP_NO_LONG_DOUBLE) - BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX); -#endif - }; -#endif // __OpenBSD__ } } -#endif +#endif // #ifndef BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER diff --git a/test/hash_float_test.hpp b/test/hash_float_test.hpp index 6b28a2e..b5f75dc 100644 --- a/test/hash_float_test.hpp +++ b/test/hash_float_test.hpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -55,19 +54,6 @@ void float_tests(char const* name, T* = 0) << boost::hash_detail::limits::digits << "\n" << "\n" - << "boost::hash_detail::call_ldexp::float_type = " - << float_type(static_cast::float_type*>(0)) - << "\n" - << "boost::hash_detail::call_frexp::float_type = " - << float_type(static_cast::float_type*>(0)) - << "\n" - << "boost::hash_detail::select_hash_type::type = " - << float_type(static_cast::type*>(0)) - << "\n" - << "\n" ; BOOST_HASH_TEST_NAMESPACE::hash x1;