aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2011-02-05 14:19:53 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2011-02-05 14:19:53 +0100
commit6c3dc0d243e2948a15d8943a631cc7599c91b8e7 (patch)
tree0fbad38683f81c4f2b8fa8025ac8b200402a8251 /Eigen/src
parente20f1a44bb137e9becfe1d90156fd1dea0ae0e5e (diff)
Fix Diagonal related const correctness issues.
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/ProductBase.h2
-rw-r--r--Eigen/src/Core/products/CoeffBasedProduct.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h
index 287ea554f..3bd3487d6 100644
--- a/Eigen/src/Core/ProductBase.h
+++ b/Eigen/src/Core/ProductBase.h
@@ -134,7 +134,7 @@ class ProductBase : public MatrixBase<Derived>
return m_result;
}
- const Diagonal<FullyLazyCoeffBaseProductType,0> diagonal() const
+ const Diagonal<const FullyLazyCoeffBaseProductType,0> diagonal() const
{ return FullyLazyCoeffBaseProductType(m_lhs, m_rhs); }
template<int Index>
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h
index 878956a33..dc20f7e1e 100644
--- a/Eigen/src/Core/products/CoeffBasedProduct.h
+++ b/Eigen/src/Core/products/CoeffBasedProduct.h
@@ -213,14 +213,14 @@ class CoeffBasedProduct
const _LhsNested& lhs() const { return m_lhs; }
const _RhsNested& rhs() const { return m_rhs; }
- const Diagonal<LazyCoeffBasedProductType,0> diagonal() const
+ const Diagonal<const LazyCoeffBasedProductType,0> diagonal() const
{ return reinterpret_cast<const LazyCoeffBasedProductType&>(*this); }
template<int DiagonalIndex>
- const Diagonal<LazyCoeffBasedProductType,DiagonalIndex> diagonal() const
+ const Diagonal<const LazyCoeffBasedProductType,DiagonalIndex> diagonal() const
{ return reinterpret_cast<const LazyCoeffBasedProductType&>(*this); }
- const Diagonal<LazyCoeffBasedProductType,Dynamic> diagonal(Index index) const
+ const Diagonal<const LazyCoeffBasedProductType,Dynamic> diagonal(Index index) const
{ return reinterpret_cast<const LazyCoeffBasedProductType&>(*this).diagonal(index); }
protected: