let the cast functor use the new ei_cast()

This commit is contained in:
Benoit Jacob 2010-03-30 14:51:47 -04:00
parent 16e416b8d7
commit 338ec0390f

View File

@ -274,7 +274,7 @@ template<typename Scalar, typename NewType>
struct ei_scalar_cast_op { struct ei_scalar_cast_op {
EIGEN_EMPTY_STRUCT_CTOR(ei_scalar_cast_op) EIGEN_EMPTY_STRUCT_CTOR(ei_scalar_cast_op)
typedef NewType result_type; typedef NewType result_type;
EIGEN_STRONG_INLINE const NewType operator() (const Scalar& a) const { return static_cast<NewType>(a); } EIGEN_STRONG_INLINE const NewType operator() (const Scalar& a) const { return ei_cast<Scalar, NewType>(a); }
}; };
template<typename Scalar, typename NewType> template<typename Scalar, typename NewType>
struct ei_functor_traits<ei_scalar_cast_op<Scalar,NewType> > struct ei_functor_traits<ei_scalar_cast_op<Scalar,NewType> >