Skip to content

Commit 1b17d17

Browse files
authored
[SYCL] Fix AccessorSubscript windows build issue (#6648)
This PR fixes an issue caused when building on Windows with MSVC. The problem was introduced in #6341. MSVC does not correctly infer the default template for its return type. This is fixed by setting the return type to auto and letting the compiler infer the return type.
1 parent 830916a commit 1b17d17

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,8 +1760,7 @@ class __SYCL_SPECIAL_CLASS accessor :
17601760
multi_ptr<DataT, AS>(getQualifiedPtr() + LinearIndex));
17611761
}
17621762
template <int Dims = Dimensions, typename = detail::enable_if_t<(Dims > 1)>>
1763-
typename AccessorCommonT::template AccessorSubscript<Dims - 1>
1764-
operator[](size_t Index) const {
1763+
auto operator[](size_t Index) const {
17651764
return AccessorSubscript<Dims - 1>(*this, Index);
17661765
}
17671766

0 commit comments

Comments
 (0)