Skip to content

Commit 5ffd965

Browse files
committed
[SYCL] Address warning
Signed-off-by: Hu, Peisen <[email protected]>
1 parent 8aef777 commit 5ffd965

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,8 +2196,13 @@ class __SYCL_EXPORT handler {
21962196
std::forward<RestT>(Rest)...);
21972197
}
21982198

2199+
template <typename T>
2200+
constexpr inline decltype(auto) forwarding_helper(T &&t) {
2201+
return std::forward<T>(t);
2202+
}
2203+
21992204
template <typename... RestT> auto property_deduction_helper(RestT &&...Rest) {
2200-
const auto &KernelObj = (std::forward<RestT>(Rest), ...);
2205+
const auto &KernelObj = (forwarding_helper(Rest), ...);
22012206
if constexpr (ext::oneapi::experimental::detail::
22022207
HasKernelPropertiesGetMethod<
22032208
decltype(KernelObj)>::value) {

0 commit comments

Comments
 (0)