From b16a97aa398ca0e2a95de78a0bb4684402a2e2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 14 Mar 2026 16:38:15 -0300 Subject: [PATCH] This could fix the MSVC build (not tested). --- include/eepp/thirdparty/svector.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/eepp/thirdparty/svector.h b/include/eepp/thirdparty/svector.h index 93ff91a95..806ee9c0f 100644 --- a/include/eepp/thirdparty/svector.h +++ b/include/eepp/thirdparty/svector.h @@ -134,7 +134,7 @@ public: template struct storage : public header { static constexpr auto alignment_of_t = std::alignment_of_v; - static constexpr auto max_alignment = std::max(std::alignment_of_v
, std::alignment_of_v); + static constexpr auto max_alignment = (std::max)(std::alignment_of_v
, std::alignment_of_v); static constexpr auto offset_to_data = detail::round_up(sizeof(header), alignment_of_t); static_assert(max_alignment <= __STDCPP_DEFAULT_NEW_ALIGNMENT__); @@ -164,7 +164,7 @@ struct storage : public header { throw std::bad_alloc(); } mem += offset_to_data; - if (static_cast(mem) > static_cast(std::numeric_limits::max())) { + if (static_cast(mem) > static_cast((std::numeric_limits::max)())) { throw std::bad_alloc(); } @@ -317,7 +317,7 @@ class svector { // got an overflow, set capacity to max new_capacity = max_size(); } - return std::min(new_capacity, max_size()); + return (std::min)(new_capacity, max_size()); } template @@ -846,7 +846,7 @@ public: } [[nodiscard]] static auto max_size() -> size_t { - return std::numeric_limits::max(); + return (std::numeric_limits::max)(); } void swap(svector& other) {