diff --git a/sycl/include/CL/sycl/sycl_span.hpp b/sycl/include/CL/sycl/sycl_span.hpp index 1c7898dd1e44a..0422b9d43ecb2 100644 --- a/sycl/include/CL/sycl/sycl_span.hpp +++ b/sycl/include/CL/sycl/sycl_span.hpp @@ -227,7 +227,7 @@ template class _SYCL_SPAN_TEMPLATE_VIS span { _SYCL_SPAN_INLINE_VISIBILITY constexpr explicit span(pointer __f, pointer __l) : __data{__f} { (void)__l; - _SYCL_SPAN_ASSERT(_Extent == distance(__f, __l), + _SYCL_SPAN_ASSERT(_Extent == std::distance(__f, __l), "size mismatch in span's constructor (ptr, ptr)"); } @@ -428,7 +428,7 @@ class _SYCL_SPAN_TEMPLATE_VIS span<_Tp, dynamic_extent> { _SYCL_SPAN_INLINE_VISIBILITY constexpr span(pointer __ptr, size_type __count) : __data{__ptr}, __size{__count} {} _SYCL_SPAN_INLINE_VISIBILITY constexpr span(pointer __f, pointer __l) - : __data{__f}, __size{static_cast(distance(__f, __l))} {} + : __data{__f}, __size{static_cast(std::distance(__f, __l))} {} template _SYCL_SPAN_INLINE_VISIBILITY constexpr span( diff --git a/sycl/test/regression/macro_conflict.cpp b/sycl/test/regression/headers_conflict.cpp similarity index 97% rename from sycl/test/regression/macro_conflict.cpp rename to sycl/test/regression/headers_conflict.cpp index 233d84bce725d..85dc14af19284 100644 --- a/sycl/test/regression/macro_conflict.cpp +++ b/sycl/test/regression/headers_conflict.cpp @@ -8,5 +8,6 @@ //===----------------------------------------------------------------------===// #define SUCCESS 0 +class distance; #include