diff --git a/include/boost/math/special_functions/binomial.hpp b/include/boost/math/special_functions/binomial.hpp index d394b0488..16b4f3305 100644 --- a/include/boost/math/special_functions/binomial.hpp +++ b/include/boost/math/special_functions/binomial.hpp @@ -19,6 +19,7 @@ namespace boost{ namespace math{ template T binomial_coefficient(unsigned n, unsigned k, const Policy& pol) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); BOOST_MATH_STD_USING static const char* function = "boost::math::binomial_coefficient<%1%>(unsigned, unsigned)"; if(k > n) diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index 718230c1d..0d0a98a5d 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -30,6 +30,7 @@ namespace boost { namespace math template inline T factorial(unsigned i, const Policy& pol) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); BOOST_MATH_STD_USING // Aid ADL for floor. if(i <= max_factorial::value) @@ -66,6 +67,7 @@ inline double factorial(unsigned i) template T double_factorial(unsigned i, const Policy& pol) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); BOOST_MATH_STD_USING // ADL lookup of std names if(i & 1) { @@ -108,6 +110,7 @@ namespace detail{ template T rising_factorial_imp(T x, int n, const Policy& pol) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); if(x < 0) { // @@ -143,6 +146,7 @@ T rising_factorial_imp(T x, int n, const Policy& pol) template inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); BOOST_MATH_STD_USING // ADL of std names if(x == 0) return 0;