diff --git a/Eigen/src/Core/Inverse.h b/Eigen/src/Core/Inverse.h index f303aebf9..b76f0439d 100644 --- a/Eigen/src/Core/Inverse.h +++ b/Eigen/src/Core/Inverse.h @@ -45,6 +45,7 @@ class Inverse : public InverseImpl::S public: typedef typename XprType::StorageIndex StorageIndex; typedef typename XprType::PlainObject PlainObject; + typedef typename XprType::Scalar Scalar; typedef typename internal::ref_selector::type XprTypeNested; typedef typename internal::remove_all::type XprTypeNestedCleaned; typedef typename internal::ref_selector::type Nested; diff --git a/test/permutationmatrices.cpp b/test/permutationmatrices.cpp index 41aa57d6d..70b469ebc 100644 --- a/test/permutationmatrices.cpp +++ b/test/permutationmatrices.cpp @@ -108,7 +108,14 @@ template void permutationmatrices(const MatrixType& m) rm = rp; rm.col(i).swap(rm.col(j)); VERIFY_IS_APPROX(rm, rp2.toDenseMatrix().template cast()); - } + } + + { + // simple compilation check + Matrix A = rp; + Matrix B = rp.transpose(); + VERIFY_IS_APPROX(A, B.transpose()); + } } template