diff --git a/test/array_for_matrix.cpp b/test/array_for_matrix.cpp index 6d7d0dd4e..237ac6722 100644 --- a/test/array_for_matrix.cpp +++ b/test/array_for_matrix.cpp @@ -26,7 +26,7 @@ void array_for_matrix(const MatrixType& m) { // Prevent overflows for integer types. if (Eigen::NumTraits::IsInteger) { - constexpr Scalar kMaxVal = Scalar(10000); + Scalar kMaxVal = Scalar(10000); m1.array() = m1.array() - kMaxVal * (m1.array() / kMaxVal); m2.array() = m2.array() - kMaxVal * (m2.array() / kMaxVal); } diff --git a/test/product.h b/test/product.h index 31f577f4e..74f01b050 100644 --- a/test/product.h +++ b/test/product.h @@ -72,7 +72,7 @@ void product(const MatrixType& m) { // Prevent overflows for integer types. if (Eigen::NumTraits::IsInteger) { - constexpr Scalar kMaxVal = Scalar(10000); + Scalar kMaxVal = Scalar(10000); m1.array() = m1.array() - kMaxVal * (m1.array() / kMaxVal); m2.array() = m2.array() - kMaxVal * (m2.array() / kMaxVal); v1.array() = v1.array() - kMaxVal * (v1.array() / kMaxVal); diff --git a/test/redux.cpp b/test/redux.cpp index 872e44f69..42c269ae7 100644 --- a/test/redux.cpp +++ b/test/redux.cpp @@ -24,7 +24,7 @@ void matrixRedux(const MatrixType& m) { MatrixType m1 = MatrixType::Random(rows, cols); - // The entries of m1 are uniformly distributed in [0,1], so m1.prod() is very small. This may lead to test + // The entries of m1 are uniformly distributed in [-1,1), so m1.prod() is very small. This may lead to test // failures if we underflow into denormals. Thus, we scale so that entries are close to 1. MatrixType m1_for_prod = MatrixType::Ones(rows, cols) + RealScalar(0.2) * m1; @@ -32,7 +32,7 @@ void matrixRedux(const MatrixType& m) { m2.setRandom(); // Prevent overflows for integer types. if (Eigen::NumTraits::IsInteger) { - constexpr Scalar kMaxVal = Scalar(10000); + Scalar kMaxVal = Scalar(10000); m1.array() = m1.array() - kMaxVal * (m1.array() / kMaxVal); m2.array() = m2.array() - kMaxVal * (m2.array() / kMaxVal); } diff --git a/test/stl_iterators.cpp b/test/stl_iterators.cpp index 4b60e683a..fee8ef51a 100644 --- a/test/stl_iterators.cpp +++ b/test/stl_iterators.cpp @@ -466,7 +466,7 @@ void test_stl_iterators(int rows = Rows, int cols = Cols) { VectorType col = VectorType::Random(rows); // Prevent overflows for integer types. if (Eigen::NumTraits::IsInteger) { - constexpr Scalar kMaxVal = Scalar(1000); + Scalar kMaxVal = Scalar(1000); row.array() = row.array() - kMaxVal * (row.array() / kMaxVal); col.array() = col.array() - kMaxVal * (col.array() / kMaxVal); }