diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-01-28 21:43:20 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-01-28 21:43:20 +0100 |
commit | c1d900af61561194ad01b16a89da9f9ce1a09723 (patch) | |
tree | b5e05631504694aa63acbd880d4af478fa12b58c /Eigen/src/Core/CwiseUnaryOp.h | |
parent | 12f8bd12a27a9359e0383aed3f44436c08ea3f92 (diff) |
bug #178: remove additional const on nested expression, and remove several const_cast.
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 22db783b5..8c182303c 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -58,6 +58,7 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal typedef typename CwiseUnaryOpImpl<UnaryOp, XprType,typename internal::traits<XprType>::StorageKind>::Base Base; EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryOp) + typedef typename internal::ref_selector<XprType>::type XprTypeNested; typedef typename internal::remove_all<XprType>::type NestedExpression; EIGEN_DEVICE_FUNC @@ -75,16 +76,16 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal /** \returns the nested expression */ EIGEN_DEVICE_FUNC - const typename internal::remove_all<typename XprType::Nested>::type& + const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const { return m_xpr; } /** \returns the nested expression */ EIGEN_DEVICE_FUNC - typename internal::remove_all<typename XprType::Nested>::type& - nestedExpression() { return m_xpr.const_cast_derived(); } + typename internal::remove_all<XprTypeNested>::type& + nestedExpression() { return m_xpr; } protected: - typename XprType::Nested m_xpr; + XprTypeNested m_xpr; const UnaryOp m_functor; }; |