fix compilation problem on MSVC

add debug info in arithmetic test
fix failing assertion in arithmetic test
This commit is contained in:
Syed Fahad
2021-07-24 14:39:50 +05:30
parent efec8f7a36
commit bb67033233
2 changed files with 43 additions and 33 deletions

View File

@@ -37,13 +37,12 @@ constexpr T max(T a, T b)
// FIXME: this looks like a duplicate from test_cpp_double_float_comparision.cpp file.
template<typename FloatingPointType> struct is_floating_point {
static const bool value;
};
template<typename FloatingPointType> const bool is_floating_point<FloatingPointType>::value = std::is_floating_point<FloatingPointType>::value
static constexpr bool value = std::is_floating_point<FloatingPointType>::value
#ifdef BOOST_MATH_USE_FLOAT128
or std::is_same<FloatingPointType,boost::multiprecision::float128>::value
or std::is_same<FloatingPointType, boost::multiprecision::float128>::value
#endif
;
;
};
template <typename FloatingPointType,
typename std::enable_if<is_floating_point<FloatingPointType>::value, bool>::type = true>
@@ -70,7 +69,7 @@ NumericType uniform_integral_number()
template <typename NumericType,
typename std::enable_if<std::is_integral<NumericType>::value && !is_floating_point<NumericType>::value, bool>::type = true>
typename std::enable_if<std::is_integral<NumericType>::value, bool>::type = true>
NumericType get_rand()
{
return uniform_integral_number<NumericType>();