diff --git a/include/cppad/cg/base_double.hpp b/include/cppad/cg/base_double.hpp index 38829192..66549d5c 100644 --- a/include/cppad/cg/base_double.hpp +++ b/include/cppad/cg/base_double.hpp @@ -20,29 +20,7 @@ namespace CppAD { /** * Specialization of the numeric_limits for doubles */ -template <> -class numeric_limits > { -public: - - static cg::CG epsilon() { - return std::numeric_limits::epsilon(); - } - - static cg::CG min() { - return (std::numeric_limits::min)(); - } - - static cg::CG max() { - return (std::numeric_limits::max)(); - } - - static cg::CG quiet_NaN() { - return std::numeric_limits::quiet_NaN(); - } - - static const int digits10 - = std::numeric_limits::digits10; -}; +CPPAD_NUMERIC_LIMITS(double, cg::CG) /** * Specialization of the machine epsilon for CG diff --git a/include/cppad/cg/base_float.hpp b/include/cppad/cg/base_float.hpp index 57ac8522..4dd50d8f 100644 --- a/include/cppad/cg/base_float.hpp +++ b/include/cppad/cg/base_float.hpp @@ -20,29 +20,7 @@ namespace CppAD { /** * Specialization of the numeric_limits for floats */ -template <> -class numeric_limits > { -public: - - static cg::CG epsilon() { - return std::numeric_limits::epsilon(); - } - - static cg::CG min() { - return std::numeric_limits::min(); - } - - static cg::CG max() { - return std::numeric_limits::max(); - } - - static cg::CG quiet_NaN() { - return std::numeric_limits::quiet_NaN(); - } - - static const int digits10 - = std::numeric_limits::digits10; -}; +CPPAD_NUMERIC_LIMITS(float, cg::CG) /** * Specialization of the machine epsilon for CG