diff --git a/include/gsl/util b/include/gsl/util index 1b0bacf..71f942d 100644 --- a/include/gsl/util +++ b/include/gsl/util @@ -111,7 +111,7 @@ GSL_SUPPRESS(bounds.2) // NO-FORMAT: attribute // clang-format on constexpr T& at(T (&arr)[N], const index i) { - static_assert(N <= static_cast(std::numeric_limits::max()), "We only support arrays up to PTRDIFF_MAX bytes."); + static_assert(N <= static_cast((std::numeric_limits::max)()), "We only support arrays up to PTRDIFF_MAX bytes."); Expects(i >= 0 && i < narrow_cast(N)); return arr[narrow_cast(i)]; }