From 1a5aea3d8619083ab02644dd1ffe054d33d0c91b Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Mon, 15 Mar 2021 23:12:00 +0100 Subject: [PATCH] Fix MSVC build error --- CHANGELOG.md | 4 ++++ include/boost/beast/core/impl/multi_buffer.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 091a4775..d6afda55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix MSVC build error. + +-------------------------------------------------------------------------------- + Version 310: * Update Release Notes. diff --git a/include/boost/beast/core/impl/multi_buffer.hpp b/include/boost/beast/core/impl/multi_buffer.hpp index 8565b09f..bd4087cd 100644 --- a/include/boost/beast/core/impl/multi_buffer.hpp +++ b/include/boost/beast/core/impl/multi_buffer.hpp @@ -916,7 +916,7 @@ prepare(size_type n) -> std::size_t altn = in_size_ * growth_factor; // Overflow detection: if(in_size_ > altn) - altn = std::numeric_limits::max(); + altn = (std::numeric_limits::max)(); else altn = (std::max)(512, altn); auto const size =