diff --git a/Eigen/src/Core/SpecialFunctions.h b/Eigen/src/Core/SpecialFunctions.h index 9f89e184d..6c6b21f98 100644 --- a/Eigen/src/Core/SpecialFunctions.h +++ b/Eigen/src/Core/SpecialFunctions.h @@ -134,7 +134,24 @@ struct lgamma_impl { * Implementation of digamma (psi) * ****************************************************************************/ -#ifdef EIGEN_HAS_C99_MATH +template +struct digamma_retval { + typedef Scalar type; +}; + +#ifndef EIGEN_HAS_C99_MATH + +template +struct digamma_impl { + EIGEN_DEVICE_FUNC + static Scalar run(Scalar x) { + EIGEN_STATIC_ASSERT((internal::is_same::value == false), + THIS_TYPE_IS_NOT_SUPPORTED); + return Scalar(0); + } +}; + +#else /* * @@ -202,14 +219,6 @@ struct digamma_impl_maybe_poly { } }; -#endif // EIGEN_HAS_C99_MATH - -template -struct digamma_retval { - typedef Scalar type; -}; - -#ifdef EIGEN_HAS_C99_MATH template struct digamma_impl { EIGEN_DEVICE_FUNC