fix compilation of ArrayBase::transposeInPlace

This commit is contained in:
Gael Guennebaud 2013-06-24 13:35:13 +02:00
parent c695cbf0fa
commit c21a04bcf9

View File

@ -253,7 +253,7 @@ struct inplace_transpose_selector;
template<typename MatrixType> template<typename MatrixType>
struct inplace_transpose_selector<MatrixType,true> { // square matrix struct inplace_transpose_selector<MatrixType,true> { // square matrix
static void run(MatrixType& m) { static void run(MatrixType& m) {
m.template triangularView<StrictlyUpper>().swap(m.transpose()); m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose());
} }
}; };
@ -261,7 +261,7 @@ template<typename MatrixType>
struct inplace_transpose_selector<MatrixType,false> { // non square matrix struct inplace_transpose_selector<MatrixType,false> { // non square matrix
static void run(MatrixType& m) { static void run(MatrixType& m) {
if (m.rows()==m.cols()) if (m.rows()==m.cols())
m.template triangularView<StrictlyUpper>().swap(m.transpose()); m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose());
else else
m = m.transpose().eval(); m = m.transpose().eval();
} }