mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 23:03:15 +08:00
fix build of class Block examples
This commit is contained in:
parent
182ed9ba6c
commit
02ee26a3a5
@ -11,10 +11,10 @@ topLeftCorner(MatrixBase<Derived>& m, int rows, int cols)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const Eigen::Block<Derived>
|
const Eigen::Block<const Derived>
|
||||||
topLeftCorner(const MatrixBase<Derived>& m, int rows, int cols)
|
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**)
|
int main(int, char**)
|
||||||
|
@ -11,10 +11,10 @@ topLeft2x2Corner(MatrixBase<Derived>& m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const Eigen::Block<Derived, 2, 2>
|
const Eigen::Block<const Derived, 2, 2>
|
||||||
topLeft2x2Corner(const MatrixBase<Derived>& m)
|
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**)
|
int main(int, char**)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user