Use boost::hash_detail::float_limits in hash_number_test. This works around

OpenBSD's inaccurate numeric_limits<long double>.


[SVN r35558]
This commit is contained in:
Daniel James
2006-10-11 18:50:59 +00:00
parent 40844fb29e
commit c7778306f8

View File

@@ -24,7 +24,7 @@
template <class T> template <class T>
void numeric_test(T*) void numeric_test(T*)
{ {
typedef std::numeric_limits<T> limits; typedef boost::hash_detail::float_limits<T> limits;
compile_time_tests((T*) 0); compile_time_tests((T*) 0);
@@ -60,7 +60,7 @@ void numeric_test(T*)
template <class T> template <class T>
void limits_test(T*) void limits_test(T*)
{ {
typedef std::numeric_limits<T> limits; typedef boost::hash_detail::float_limits<T> limits;
if(limits::is_specialized) if(limits::is_specialized)
{ {
@@ -91,7 +91,7 @@ void limits_test(T*)
template <class T> template <class T>
void poor_quality_tests(T*) void poor_quality_tests(T*)
{ {
typedef std::numeric_limits<T> limits; typedef boost::hash_detail::float_limits<T> limits;
HASH_NAMESPACE::hash<T> x1; HASH_NAMESPACE::hash<T> x1;
HASH_NAMESPACE::hash<T> x2; HASH_NAMESPACE::hash<T> x2;