From ae2b699e045b08263e3e0aa9fbc33c176cb400d3 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Thu, 11 Jun 2020 13:48:25 +0200 Subject: [PATCH] Fix max() compile error closes #1980 --- CHANGELOG.md | 4 ++++ include/boost/beast/core/impl/file_stdio.ipp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65beca68..918b807e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `max` compile error + +-------------------------------------------------------------------------------- + Version 296: * Remove buffers_adapter.hpp (API Change) diff --git a/include/boost/beast/core/impl/file_stdio.ipp b/include/boost/beast/core/impl/file_stdio.ipp index f42521b3..301a7e81 100644 --- a/include/boost/beast/core/impl/file_stdio.ipp +++ b/include/boost/beast/core/impl/file_stdio.ipp @@ -270,7 +270,7 @@ seek(std::uint64_t offset, error_code& ec) ec = make_error_code(errc::bad_file_descriptor); return; } - if(offset > static_cast(std::numeric_limits::max())) + if(offset > static_cast((std::numeric_limits::max)())) { ec = make_error_code(errc::invalid_seek); return;