Dear all,
while browsing through Eigen's code, I found the following aliasing problem:
#include <Eigen/Eigen>
#include <iostream>
using namespace Eigen;
int main()
{
VectorXd v = VectorXd::LinSpaced(15, 1, 15);
MatrixXd M = Map<MatrixXd>(v.data(), 5, 3);
Transpositions<Dynamic> T(3);
T[0] = 2; T[1] = 0; T[2] = 0;
MatrixXd M2 = T*M.topLeftCorner(3, 3);
std::cout << M2 << std::endl << std::endl;
M.bottomRightCorner(3, 3) = T*M.topLeftCorner(3, 3);
std::cout << M.bottomRightCorner(3, 3) << std::endl << std::endl;
}