aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/matrix_power.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/test/matrix_power.cpp')
-rw-r--r--unsupported/test/matrix_power.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/unsupported/test/matrix_power.cpp b/unsupported/test/matrix_power.cpp
index 58644f84b..baf183d12 100644
--- a/unsupported/test/matrix_power.cpp
+++ b/unsupported/test/matrix_power.cpp
@@ -97,8 +97,12 @@ void testGeneral(const MatrixType& m, double tol)
}
template<typename MatrixType>
-void testSingular(const MatrixType& m, double tol)
+void testSingular(const MatrixType& m_const, double tol)
{
+ // we need to pass by reference in order to prevent errors with
+ // MSVC for aligned data types ...
+ MatrixType& m = const_cast<MatrixType&>(m_const);
+
const int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex;
typedef typename internal::conditional<IsComplex, TriangularView<MatrixType,Upper>, const MatrixType&>::type TriangularType;
typename internal::conditional< IsComplex, ComplexSchur<MatrixType>, RealSchur<MatrixType> >::type schur;
@@ -126,8 +130,12 @@ void testSingular(const MatrixType& m, double tol)
}
template<typename MatrixType>
-void testLogThenExp(const MatrixType& m, double tol)
+void testLogThenExp(const MatrixType& m_const, double tol)
{
+ // we need to pass by reference in order to prevent errors with
+ // MSVC for aligned data types ...
+ MatrixType& m = const_cast<MatrixType&>(m_const);
+
typedef typename MatrixType::Scalar Scalar;
Scalar x;