Here is the proper fix.

This commit is contained in:
Hauke Heibel 2010-02-11 11:39:02 +01:00
parent 13ce92f5ba
commit ae0a17d30b
2 changed files with 4 additions and 4 deletions

View File

@ -321,15 +321,15 @@ template<> inline bool ei_random()
{
return (ei_random<int>(0,1) == 1);
}
inline bool ei_isMuchSmallerThan(bool a, bool, bool = false/*NumTraits<bool>::dummy_precision()*/)
inline bool ei_isMuchSmallerThan(bool a, bool, bool = NumTraits<bool>::dummy_precision())
{
return !a;
}
inline bool ei_isApprox(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/)
inline bool ei_isApprox(bool a, bool b, bool = NumTraits<bool>::dummy_precision())
{
return a == b;
}
inline bool ei_isApproxOrLessThan(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/)
inline bool ei_isApproxOrLessThan(bool a, bool b, bool = NumTraits<bool>::dummy_precision())
{
return int(a) <= int(b);
}

View File

@ -61,7 +61,7 @@ template<typename T> struct ei_default_float_numtraits
template<typename T> struct ei_default_integral_numtraits
: std::numeric_limits<T>
{
inline static int dummy_precision() { return 0; }
inline static T dummy_precision() { return T(0); }
inline static T highest() { return std::numeric_limits<T>::max(); }
inline static T lowest() { return std::numeric_limits<T>::min(); }
};