13c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMatrixXi mat(3,3); 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyrymat << 1, 2, 3, 4, 5, 6, 7, 8, 9; 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyrycout << "Here is the matrix mat:\n" << mat << endl; 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry// The eval() solves the aliasing problem 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyrymat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval(); 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyrycout << "After the assignment, mat = \n" << mat << endl; 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry