aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/qr_colpivoting.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-08-19 14:18:05 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-08-19 14:18:05 +0200
commit42e2578ef9fcbb62ad6e07933ccf531f6f7cd1b3 (patch)
tree90cef174284cad35f0d13d4b991db83335554caf /test/qr_colpivoting.cpp
parent5734ee6df42991e59609ffd26aaeb3c7aacd61e2 (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/qr_colpivoting.cpp')
-rw-r--r--test/qr_colpivoting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp
index dd1f89bd6..cdcf060ef 100644
--- a/test/qr_colpivoting.cpp
+++ b/test/qr_colpivoting.cpp
@@ -31,7 +31,7 @@ template<typename MatrixType> void qr()
typedef typename MatrixType::Index Index;
Index rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols2 = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);
- Index rank = internal::random<Index>(1, std::min(rows, cols)-1);
+ Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
@@ -64,7 +64,7 @@ template<typename MatrixType, int Cols2> void qr_fixedsize()
{
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
typedef typename MatrixType::Scalar Scalar;
- int rank = internal::random<int>(1, std::min(int(Rows), int(Cols))-1);
+ int rank = internal::random<int>(1, (std::min)(int(Rows), int(Cols))-1);
Matrix<Scalar,Rows,Cols> m1;
createRandomPIMatrixOfRank(rank,Rows,Cols,m1);
ColPivHouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);