diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 6d9fd6a36ad9c..86fad06ebdc9e 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -326,11 +326,11 @@ class accessor_common { MIDs[0] = Index; } - template - typename detail::enable_if_t<(CurDims > 1), AccessorSubscript> - operator[](size_t Index) { + template 1)>> + auto operator[](size_t Index) { MIDs[Dims - CurDims] = Index; - return AccessorSubscript(MAccessor, MIDs); + return AccessorSubscript(MAccessor, MIDs); } template