diff --git a/include/ankerl/svector.h b/include/ankerl/svector.h index 93ff91a..fa13009 100644 --- a/include/ankerl/svector.h +++ b/include/ankerl/svector.h @@ -134,7 +134,7 @@ class header { 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 @@ class svector { } [[nodiscard]] static auto max_size() -> size_t { - return std::numeric_limits::max(); + return (std::numeric_limits::max)(); } void swap(svector& other) {