diff options
-rw-r--r-- | doc/examples/class_Block.cpp | 4 | ||||
-rw-r--r-- | doc/examples/class_FixedBlock.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/class_Block.cpp b/doc/examples/class_Block.cpp index c6144cef5..ace719afc 100644 --- a/doc/examples/class_Block.cpp +++ b/doc/examples/class_Block.cpp @@ -11,10 +11,10 @@ topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) } template<typename Derived> -const Eigen::Block<Derived> +const Eigen::Block<const Derived> topLeftCorner(const MatrixBase<Derived>& m, int rows, int cols) { - return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); + return Eigen::Block<const Derived>(m.derived(), 0, 0, rows, cols); } int main(int, char**) diff --git a/doc/examples/class_FixedBlock.cpp b/doc/examples/class_FixedBlock.cpp index 5e0e53da3..9978b32e8 100644 --- a/doc/examples/class_FixedBlock.cpp +++ b/doc/examples/class_FixedBlock.cpp @@ -11,10 +11,10 @@ topLeft2x2Corner(MatrixBase<Derived>& m) } template<typename Derived> -const Eigen::Block<Derived, 2, 2> +const Eigen::Block<const Derived, 2, 2> topLeft2x2Corner(const MatrixBase<Derived>& m) { - return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0); + return Eigen::Block<const Derived, 2, 2>(m.derived(), 0, 0); } int main(int, char**) |