aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/tut_arithmetic_transpose_aliasing.cpp
blob: f82e6f2ac98170299112c7185282df2937991c78 (plain)
1
2
3
4
5
Matrix2i a; a << 1, 2, 3, 4;
cout << "Here is the matrix a:\n" << a << endl;

a = a.transpose(); // !!! do NOT do this !!!
cout << "and the result of the aliasing effect:\n" << a << endl;