diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-03-30 14:16:54 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-03-30 14:16:54 -0400 |
commit | 9e0d8697c78fb4668246c59186eca342ba3eff88 (patch) | |
tree | 606d1dcf2823401c753a5d23b9e0986005d8a694 /Eigen/src/Core/IO.h | |
parent | 8f99ae5ea44965396a6174ab97a41f0a2101b984 (diff) |
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.
Diffstat (limited to 'Eigen/src/Core/IO.h')
-rw-r--r-- | Eigen/src/Core/IO.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<Scalar>::Real RealScalar; static inline int run() { - return (int) std::ceil(-ei_log(NumTraits<RealScalar>::epsilon())/ei_log(RealScalar(10))); + return ei_cast_to_int(std::ceil(-ei_log(NumTraits<RealScalar>::epsilon())/ei_log(RealScalar(10)))); } }; |