diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
commit | 42e2578ef9fcbb62ad6e07933ccf531f6f7cd1b3 (patch) | |
tree | 90cef174284cad35f0d13d4b991db83335554caf /test/sparse_basic.cpp | |
parent | 5734ee6df42991e59609ffd26aaeb3c7aacd61e2 (diff) |
the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r-- | test/sparse_basic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index d8ff06a33..a6c148591 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp @@ -34,7 +34,7 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re typedef typename SparseMatrixType::Scalar Scalar; enum { Flags = SparseMatrixType::Flags }; - double density = std::max(8./(rows*cols), 0.01); + double density = (std::max)(8./(rows*cols), 0.01); typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix; typedef Matrix<Scalar,Dynamic,1> DenseVector; Scalar eps = 1e-6; @@ -207,7 +207,7 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re initSparse<Scalar>(density, refMat2, m2); int j0 = internal::random<int>(0,rows-2); int j1 = internal::random<int>(0,rows-2); - int n0 = internal::random<int>(1,rows-std::max(j0,j1)); + int n0 = internal::random<int>(1,rows-(std::max)(j0,j1)); VERIFY_IS_APPROX(m2.innerVectors(j0,n0), refMat2.block(0,j0,rows,n0)); VERIFY_IS_APPROX(m2.innerVectors(j0,n0)+m2.innerVectors(j1,n0), refMat2.block(0,j0,rows,n0)+refMat2.block(0,j1,rows,n0)); |