From 949c771b03de448bdedea80c44a4a5f65284bfeb Mon Sep 17 00:00:00 2001 From: Flaviu_ <37621568+flaviu22@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:11:19 +0200 Subject: [PATCH] Resolve conflict with Windows header about max macro --- include/rapidjson/allocators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/allocators.h b/include/rapidjson/allocators.h index ddcf478..35650af 100644 --- a/include/rapidjson/allocators.h +++ b/include/rapidjson/allocators.h @@ -434,7 +434,7 @@ namespace internal { template inline T* Realloc(A& a, T* old_p, size_t old_n, size_t new_n) { - RAPIDJSON_NOEXCEPT_ASSERT(old_n <= std::numeric_limits::max() / sizeof(T) && new_n <= std::numeric_limits::max() / sizeof(T)); + RAPIDJSON_NOEXCEPT_ASSERT(old_n <= (std::numeric_limits::max)() / sizeof(T) && new_n <= (std::numeric_limits::max)() / sizeof(T)); return static_cast(a.Realloc(old_p, old_n * sizeof(T), new_n * sizeof(T))); }