From 9e0d8697c78fb4668246c59186eca342ba3eff88 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 30 Mar 2010 14:16:54 -0400 Subject: add ei_cast_to_int, we are indeed somethings (e.g. in IO.h) casting scalars to int and the only way to allow users to extend that to their own scalar types that don't have int cast operators, was to allow them specialize ei_cast_to_int_impl. --- Eigen/src/Core/IO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Core/IO.h') diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index ffb214894..22db103ed 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -132,7 +132,7 @@ struct ei_significant_decimals_impl typedef typename NumTraits::Real RealScalar; static inline int run() { - return (int) std::ceil(-ei_log(NumTraits::epsilon())/ei_log(RealScalar(10))); + return ei_cast_to_int(std::ceil(-ei_log(NumTraits::epsilon())/ei_log(RealScalar(10)))); } }; -- cgit v1.2.3