Skip to content

Commit

Permalink
Avoid collision of ::max with windows.h macro
Browse files Browse the repository at this point in the history
  • Loading branch information
nickaein committed Jun 21, 2019
1 parent 4c23af1 commit 1722188
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/src/unit-concepts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ TEST_CASE("concepts")
// X::size_type must return an unsigned integer
CHECK((std::is_unsigned<json::size_type>::value));
// X::size_type can represent any non-negative value of X::difference_type
CHECK(static_cast<json::size_type>(std::numeric_limits<json::difference_type>::max()) <=
std::numeric_limits<json::size_type>::max());
CHECK(static_cast<json::size_type>((std::numeric_limits<json::difference_type>::max)()) <=
(std::numeric_limits<json::size_type>::max)());

// the expression "X u" has the post-condition "u.empty()"
{
Expand Down
2 changes: 1 addition & 1 deletion test/src/unit-regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ TEST_CASE("regression tests")
};

check_roundtrip(100000000000.1236);
check_roundtrip(std::numeric_limits<json::number_float_t>::max());
check_roundtrip((std::numeric_limits<json::number_float_t>::max)());

// Some more numbers which fail to roundtrip when serialized with digits10 significand digits (instead of max_digits10)
check_roundtrip(1.541888611948064e-17);
Expand Down

0 comments on commit 1722188

Please sign in to comment.