00001 MatrixXi mat(3,3); 00002 mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; 00003 cout << "Here is the matrix mat:\n" << mat << endl; 00004 00005 // The eval() solves the aliasing problem 00006 mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval(); 00007 cout << "After the assignment, mat = \n" << mat << endl;