fix compilation: const (T&) != const T& , use ei_makeconst

This commit is contained in:
Benoit Jacob 2010-04-30 14:28:35 -04:00
parent cf4f90ccea
commit 8f249e8b54

View File

@ -161,7 +161,7 @@ struct ei_real_ref_retval
};
template<typename Scalar>
inline const EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) ei_real_ref(const Scalar& x)
inline typename ei_makeconst< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type ei_real_ref(const Scalar& x)
{
return ei_real_ref_impl<Scalar>::run(x);
}
@ -213,7 +213,7 @@ struct ei_imag_ref_retval
};
template<typename Scalar>
inline const EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) ei_imag_ref(const Scalar& x)
inline typename ei_makeconst< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type ei_imag_ref(const Scalar& x)
{
return ei_imag_ref_impl<Scalar>::run(x);
}