From eba8244ead0e0beb50bed694d2d2eea432e09234 Mon Sep 17 00:00:00 2001 From: Isaac Nickaein Date: Sat, 22 Jun 2019 02:33:13 +0430 Subject: [PATCH] Avoid collision of ::max with windows.h macro --- test/src/unit-concepts.cpp | 4 ++-- test/src/unit-regression.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/unit-concepts.cpp b/test/src/unit-concepts.cpp index 9649af407..f28f04324 100644 --- a/test/src/unit-concepts.cpp +++ b/test/src/unit-concepts.cpp @@ -73,8 +73,8 @@ TEST_CASE("concepts") // X::size_type must return an unsigned integer CHECK((std::is_unsigned::value)); // X::size_type can represent any non-negative value of X::difference_type - CHECK(static_cast(std::numeric_limits::max()) <= - std::numeric_limits::max()); + CHECK(static_cast((std::numeric_limits::max)()) <= + (std::numeric_limits::max)()); // the expression "X u" has the post-condition "u.empty()" { diff --git a/test/src/unit-regression.cpp b/test/src/unit-regression.cpp index 6b7d90aa9..88b12114d 100644 --- a/test/src/unit-regression.cpp +++ b/test/src/unit-regression.cpp @@ -719,7 +719,7 @@ TEST_CASE("regression tests") }; check_roundtrip(100000000000.1236); - check_roundtrip(std::numeric_limits::max()); + check_roundtrip((std::numeric_limits::max)()); // Some more numbers which fail to roundtrip when serialized with digits10 significand digits (instead of max_digits10) check_roundtrip(1.541888611948064e-17);