diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 7cbcbb0773ef9..bb25c37d60ca0 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -1877,7 +1877,7 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor : size_t byte_size() const noexcept { return size() * sizeof(DataT); } size_t max_size() const noexcept { - return std::numeric_limits::max(); + return (std::numeric_limits::max)(); } bool empty() const noexcept { return size() == 0; } @@ -2574,7 +2574,7 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor size_t byte_size() const noexcept { return this->size() * sizeof(DataT); } size_t max_size() const noexcept { - return std::numeric_limits::max(); + return (std::numeric_limits::max)(); } bool empty() const noexcept { return this->size() == 0; }