Skip to content

Commit a62b220

Browse files
[SYCL] Use explicit return type in get_vec_idx helper (#16464)
Apparently, some versions of MSVC (e.g. 14.29.30133) fail to compile it ``` error C3779: 'sycl::_V1::detail::SwizzleOp<VecT,OperationLeftT,OperationRightT,OperationCurrentT,Indexes...>::get_vec_idx': a function that returns 'auto' cannot be used before it is defined ``` when used with `-fsycl-host-compiler`. This has been caught by the existing `bit_cast_win.cpp` test in a downstream environment.
1 parent 7f9887a commit a62b220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ class SwizzleOp : public detail::NamedSwizzlesMixinBoth<
11811181
}
11821182

11831183
private:
1184-
static constexpr auto get_vec_idx(int idx) {
1184+
static constexpr int get_vec_idx(int idx) {
11851185
int counter = 0;
11861186
int result = -1;
11871187
((result = counter++ == idx ? Indexes : result), ...);

0 commit comments

Comments
 (0)