aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/MatrixBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/MatrixBase.h')
-rw-r--r--Eigen/src/Core/MatrixBase.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index a4e4e15d7..7eb7c1eff 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -504,8 +504,12 @@ template<typename Derived> class MatrixBase
template<typename NewType>
- const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived> cast() const;
-
+ typename ei_cast_return_type<
+ const Derived&,
+ const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
+ >::type
+ cast() const;
+
/** \returns the matrix or vector obtained by evaluating this expression.
*
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns