diff options
Diffstat (limited to 'Eigen/src/Core/IO.h')
-rw-r--r-- | Eigen/src/Core/IO.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index 853506288..3da92d21a 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -126,8 +126,8 @@ DenseBase<Derived>::format(const IOFormat& fmt) const return WithFormat<Derived>(derived(), fmt); } -template<typename Scalar> -struct ei_significant_decimals_impl +template<typename Scalar, bool IsInteger> +struct ei_significant_decimals_default_impl { typedef typename NumTraits<Scalar>::Real RealScalar; static inline int run() @@ -136,6 +136,20 @@ struct ei_significant_decimals_impl } }; +template<typename Scalar> +struct ei_significant_decimals_default_impl<Scalar, true> +{ + static inline int run() + { + return 0; + } +}; + +template<typename Scalar> +struct ei_significant_decimals_impl + : ei_significant_decimals_default_impl<Scalar, NumTraits<Scalar>::IsInteger> +{}; + /** \internal * print the matrix \a _m to the output stream \a s using the output format \a fmt */ template<typename Derived> |