diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-03-30 14:47:45 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-03-30 14:47:45 -0400 |
commit | 16e416b8d745b1fc64111581fec431d843591274 (patch) | |
tree | 5f51c52e864a8d94760e1ea7457f65f519fa5844 /Eigen/src/Core/IO.h | |
parent | 9e0d8697c78fb4668246c59186eca342ba3eff88 (diff) |
generalize the idea of the previous commit to all kinds of casts, see this forum thread:
http://forum.kde.org/viewtopic.php?f=74&t=86914
this is important to allow users to support custom types that don't have the needed conversion operators.
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 22db103ed..c98742246 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 ei_cast_to_int(std::ceil(-ei_log(NumTraits<RealScalar>::epsilon())/ei_log(RealScalar(10)))); + return ei_cast<RealScalar,int>(std::ceil(-ei_log(NumTraits<RealScalar>::epsilon())/ei_log(RealScalar(10)))); } }; |