aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-06 12:43:01 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-06 12:43:01 -0500
commit02ee26a3a51675969016bab4e3e406d58b0979b6 (patch)
tree7572c75c1ccdc8790f36f73647cff1a75b7e8b84 /doc/examples
parent182ed9ba6c0d7ee7a963765eb8891faf28a6b4b2 (diff)
fix build of class Block examples
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/class_Block.cpp4
-rw-r--r--doc/examples/class_FixedBlock.cpp4
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**)