fix build of class Block examples

This commit is contained in:
Benoit Jacob 2011-02-06 12:43:01 -05:00
parent 182ed9ba6c
commit 02ee26a3a5
2 changed files with 4 additions and 4 deletions

View File

@ -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**)

View File

@ -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**)