From 22bff949c898e7c340a415d771145c0bd22317d6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 21 Jul 2011 11:19:36 +0200 Subject: protect calls to min and max with parentheses to make Eigen compatible with default windows.h (transplanted from 49b6e9143e1d74441924c0c313536e263e12a55c ) --- test/adjoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/adjoint.cpp') diff --git a/test/adjoint.cpp b/test/adjoint.cpp index 643aca731..76c59bedd 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -65,7 +65,7 @@ template void adjoint(const MatrixType& m) // check basic properties of dot, norm, norm2 typedef typename NumTraits::Real RealScalar; - RealScalar ref = NumTraits::IsInteger ? RealScalar(0) : std::max((s1 * v1 + s2 * v2).norm(),v3.norm()); + RealScalar ref = NumTraits::IsInteger ? RealScalar(0) : (std::max)((s1 * v1 + s2 * v2).norm(),v3.norm()); VERIFY(test_isApproxWithRef((s1 * v1 + s2 * v2).dot(v3), internal::conj(s1) * v1.dot(v3) + internal::conj(s2) * v2.dot(v3), ref)); VERIFY(test_isApproxWithRef(v3.dot(s1 * v1 + s2 * v2), s1*v3.dot(v1)+s2*v3.dot(v2), ref)); VERIFY_IS_APPROX(internal::conj(v1.dot(v2)), v2.dot(v1)); @@ -84,7 +84,7 @@ template void adjoint(const MatrixType& m) // check compatibility of dot and adjoint - ref = NumTraits::IsInteger ? 0 : std::max(std::max(v1.norm(),v2.norm()),std::max((square * v2).norm(),(square.adjoint() * v1).norm())); + ref = NumTraits::IsInteger ? 0 : (std::max)((std::max)(v1.norm(),v2.norm()),(std::max)((square * v2).norm(),(square.adjoint() * v1).norm())); VERIFY(test_isApproxWithRef(v1.dot(square * v2), (square.adjoint() * v1).dot(v2), ref)); // like in testBasicStuff, test operator() to check const-qualification -- cgit v1.2.3