mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Remove uses of static_assert(false)
This commit is contained in:
@@ -286,7 +286,7 @@ T big_digamma(T x)
|
||||
BOOST_MATH_STD_USING
|
||||
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "big_digamma can not be used in standalone mode");
|
||||
static_assert(sizeof(T) == 0, "big_digamma can not be used in standalone mode");
|
||||
#endif
|
||||
|
||||
if(x < 0)
|
||||
|
||||
@@ -457,7 +457,7 @@ inline mpfr_class skewness(const extreme_value_distribution<mpfr_class, Policy>&
|
||||
// See http://mathworld.wolfram.com/ExtremeValueDistribution.html
|
||||
//
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpfr skewness can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpfr skewness can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr_class>("1.1395470994046486574927930193898461120875997958366");
|
||||
@@ -468,7 +468,7 @@ inline mpfr_class skewness(const rayleigh_distribution<mpfr_class, Policy>& /*di
|
||||
{
|
||||
// using namespace boost::math::constants;
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpfr skewness can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpfr skewness can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr_class>("0.63111065781893713819189935154422777984404221106391");
|
||||
@@ -481,7 +481,7 @@ inline mpfr_class kurtosis(const rayleigh_distribution<mpfr_class, Policy>& /*di
|
||||
{
|
||||
// using namespace boost::math::constants;
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpfr kurtosis can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpfr kurtosis can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr_class>("3.2450893006876380628486604106197544154170667057995");
|
||||
@@ -496,7 +496,7 @@ inline mpfr_class kurtosis_excess(const rayleigh_distribution<mpfr_class, Policy
|
||||
//using namespace boost::math::constants;
|
||||
// Computed using NTL at 150 bit, about 50 decimal digits.
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpfr excess kurtosis can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpfr excess kurtosis can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr_class>("0.2450893006876380628486604106197544154170667057995");
|
||||
@@ -809,7 +809,7 @@ inline mpfr_class erf_inv_imp(const mpfr_class& p, const mpfr_class& q, const Po
|
||||
inline mpfr_class bessel_i0(mpfr_class x)
|
||||
{
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpfr bessel_i0 can not be calculated in standalone mode");
|
||||
static_assert(sizeof(x) == 0, "mpfr bessel_i0 can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
static const mpfr_class P1[] = {
|
||||
|
||||
@@ -404,7 +404,7 @@ inline mpfr::mpreal skewness(const extreme_value_distribution<mpfr::mpreal, Poli
|
||||
// See http://mathworld.wolfram.com/ExtremeValueDistribution.html
|
||||
//
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpreal skewness can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpreal skewness can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr::mpreal>("1.1395470994046486574927930193898461120875997958366");
|
||||
@@ -415,7 +415,7 @@ inline mpfr::mpreal skewness(const rayleigh_distribution<mpfr::mpreal, Policy>&
|
||||
{
|
||||
// using namespace boost::math::constants;
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpreal skewness can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpreal skewness can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr::mpreal>("0.63111065781893713819189935154422777984404221106391");
|
||||
@@ -428,7 +428,7 @@ inline mpfr::mpreal kurtosis(const rayleigh_distribution<mpfr::mpreal, Policy>&
|
||||
{
|
||||
// using namespace boost::math::constants;
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpreal kurtosis can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpreal kurtosis can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr::mpreal>("3.2450893006876380628486604106197544154170667057995");
|
||||
@@ -443,7 +443,7 @@ inline mpfr::mpreal kurtosis_excess(const rayleigh_distribution<mpfr::mpreal, Po
|
||||
//using namespace boost::math::constants;
|
||||
// Computed using NTL at 150 bit, about 50 decimal digits.
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpreal excess kurtosis can not be calculated in standalone mode");
|
||||
static_assert(sizeof(Policy) == 0, "mpreal excess kurtosis can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
return boost::lexical_cast<mpfr::mpreal>("0.2450893006876380628486604106197544154170667057995");
|
||||
@@ -756,7 +756,7 @@ mpfr::mpreal erf_inv_imp(const mpfr::mpreal& p, const mpfr::mpreal& q, const Pol
|
||||
inline mpfr::mpreal bessel_i0(mpfr::mpreal x)
|
||||
{
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "mpreal bessel_i0 can not be calculated in standalone mode");
|
||||
static_assert(sizeof(x) == 0, "mpreal bessel_i0 can not be calculated in standalone mode");
|
||||
#endif
|
||||
|
||||
static const mpfr::mpreal P1[] = {
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
str.append(1U, 'e');
|
||||
|
||||
#ifdef BOOST_MATH_STANDALONE
|
||||
static_assert(false, "IO streams for intel compilers using _Quad types can not be used in standalone mode");
|
||||
static_assert(sizeof(string_type), "IO streams for intel compilers using _Quad types can not be used in standalone mode");
|
||||
#else
|
||||
string_type e = boost::lexical_cast<string_type>(std::abs(my_exp));
|
||||
#endif
|
||||
|
||||
@@ -246,7 +246,7 @@ private:
|
||||
#elif BOOST_MATH_ENDIAN_LITTLE_BYTE
|
||||
static constexpr int offset_ = 4;
|
||||
#else
|
||||
static_assert(false, "Endian type could not be identified");
|
||||
static_assert(sizeof(double_precision) == 0, "Endian type could not be identified");
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -306,7 +306,7 @@ private:
|
||||
#elif BOOST_MATH_ENDIAN_LITTLE_BYTE
|
||||
static constexpr int offset_ = 4;
|
||||
#else
|
||||
static_assert(false, "Endian type could not be identified");
|
||||
static_assert(sizeof(double_precision) == 0, "Endian type could not be identified");
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -420,7 +420,7 @@ private:
|
||||
#elif BOOST_MATH_ENDIAN_LITTLE_BYTE
|
||||
static constexpr int offset_ = 12;
|
||||
#else
|
||||
static_assert(false, "Endian type could not be identified");
|
||||
static_assert(sizeof(extended_double_precision) == 0, "Endian type could not be identified");
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -501,7 +501,7 @@ private:
|
||||
#elif BOOST_MATH_ENDIAN_LITTLE_BYTE
|
||||
static constexpr int offset_ = 12;
|
||||
#else
|
||||
static_assert(false, "Endian type could not be identified");
|
||||
static_assert(sizeof(extended_double_precision) == 0, "Endian type could not be identified");
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ inline T create_test_value(largest_float, const char* str, const std::false_type
|
||||
#ifdef BOOST_MATH_INSTRUMENT_CREATE_TEST_VALUE
|
||||
create_type = 3;
|
||||
#elif defined(BOOST_MATH_STANDALONE)
|
||||
static_assert(false, "Can not create a test value using lexical cast of string in standalone mode");
|
||||
static_assert(sizeof(T) == 0, "Can not create a test value using lexical cast of string in standalone mode");
|
||||
#endif
|
||||
return boost::lexical_cast<T>(str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user