diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -207,7 +207,7 @@ { auto __c = __a * __b; __r = __c; - return __c > (numeric_limits::max)(); + return __c > numeric_limits::max(); } template @@ -216,7 +216,7 @@ { auto __c = __a * __b; __r = __c; - return __c > (numeric_limits::max)(); + return __c > numeric_limits::max(); } template @@ -227,7 +227,7 @@ #if !defined(_LIBCPP_COMPILER_MSVC) return __builtin_mul_overflow(__a, __b, &__r); #else - bool __did = __b && ((numeric_limits<_Tp>::max)() / __b) < __a; + bool __did = __b && (numeric_limits<_Tp>::max() / __b) < __a; __r = __a * __b; return __did; #endif @@ -435,7 +435,7 @@ } else { - if (__x <= (__tl::max)()) + if (__x <= __tl::max()) { __value = __x; return __r; @@ -526,7 +526,7 @@ auto __p = __tx::__read(__first, __last, __a, __b); if (__p == __last || !__in_pattern(*__p)) { - __output_type __m = (numeric_limits<_Tp>::max)(); + __output_type __m = numeric_limits<_Tp>::max(); if (__m >= __a && __m - __a >= __b) { __value = __a + __b; @@ -581,7 +581,7 @@ if (__p == __last || !__in_pattern(*__p, __base)) { - if ((__tl::max)() - __a >= __b) + if (__tl::max() - __a >= __b) { __value = __a + __b; return {__p, {}}; diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -132,11 +132,14 @@ #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER > 17 -inline constexpr size_t dynamic_extent = (numeric_limits::max)(); +inline constexpr size_t dynamic_extent = numeric_limits::max(); template class span; @@ -546,4 +549,6 @@ _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP_SPAN