From b42c03ce91bc0561d3b05d0480558e31424c9715 Mon Sep 17 00:00:00 2001 From: Caball009 <82909616+Caball009@users.noreply.github.com> Date: Tue, 8 Nov 2022 06:32:40 +0100 Subject: [PATCH 1/2] Undefining macro [max] from minwindef.h or stdlib.h Macro [max] is included and makes it impossible to use [std::max] unless the macro's undefined again. --- single_include/mio/mio.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/single_include/mio/mio.hpp b/single_include/mio/mio.hpp index c568a46..2b79930 100644 --- a/single_include/mio/mio.hpp +++ b/single_include/mio/mio.hpp @@ -1758,3 +1758,5 @@ using shared_ummap_sink = basic_shared_mmap_sink; } // namespace mio #endif // MIO_SHARED_MMAP_HEADER + +#undef max From 0abebeb2e2b38249ae02527999d3b599c0bf3e39 Mon Sep 17 00:00:00 2001 From: Caball009 <82909616+Caball009@users.noreply.github.com> Date: Tue, 8 Nov 2022 06:33:30 +0100 Subject: [PATCH 2/2] Undefining macro [max] from minwindef.h or stdlib.h Macro [max] is included and makes it impossible to use [std::max] unless it's undefined again. --- include/mio/mmap.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index def559a..596ad6b 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -490,3 +490,5 @@ mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& error) #include "detail/mmap.ipp" #endif // MIO_MMAP_HEADER + +#undef max