- Note
- Since an attempt to write to a temporary object may result in a compilation error, it is not possible to use the result of matrix.block() as an output parameter of a function. However, there is a workaround: the parameter can be declared as const and then casted to non-const as suggested in Eigen's documentation: https://eigen.tuxfamily.org/dox/TopicFunctionTakingEigenTypes.html. This hack is useful when it is necessary to handle matrix blocks and matrices identically.