aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CwiseUnaryOp.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-04-29 14:57:18 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-04-29 14:57:18 +0000
commit9e9e99a42e136d4fde22f408438c6afa06e49a85 (patch)
treeacda186e94e06a40e5c76e34e7f1a466b3e6aafc /Eigen/src/Core/CwiseUnaryOp.h
parent8b1e7c2792525ecc43f68ee42bf6af1473fd6699 (diff)
casting to the same type no longer generates a CwiseUnaryOp
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r--Eigen/src/Core/CwiseUnaryOp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h
index 076d568e0..5915dad54 100644
--- a/Eigen/src/Core/CwiseUnaryOp.h
+++ b/Eigen/src/Core/CwiseUnaryOp.h
@@ -188,7 +188,11 @@ MatrixBase<Derived>::imag() const { return derived(); }
*/
template<typename Derived>
template<typename NewType>
-EIGEN_STRONG_INLINE const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
+EIGEN_STRONG_INLINE
+typename ei_cast_return_type<
+ const Derived&,
+ const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
+ >::type
MatrixBase<Derived>::cast() const
{
return derived();