@@ -3310,7 +3310,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
33103310 RestT &&...Rest) {
33113311 constexpr detail::code_location CodeLoc = getCodeLocation<KernelName>();
33123312 detail::tls_code_loc_t TlsCodeLocCapture (CodeLoc);
3313- using KernelType = std::tuple_element_t <0 , std::tuple<RestT...>>;
3313+ using KernelType = std::remove_const_t <
3314+ std::remove_reference_t <std::tuple_element_t <0 , std::tuple<RestT...>>>>;
33143315
33153316 // TODO The handler-less path does not support reductions, and
33163317 // kernel functions with the kernel_handler type argument yet.
@@ -3340,7 +3341,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
33403341 parallel_for (nd_range<Dims> Range, RestT &&...Rest) {
33413342 constexpr detail::code_location CodeLoc = getCodeLocation<KernelName>();
33423343 detail::tls_code_loc_t TlsCodeLocCapture (CodeLoc);
3343- using KernelType = std::tuple_element_t <0 , std::tuple<RestT...>>;
3344+ using KernelType = std::remove_const_t <
3345+ std::remove_reference_t <std::tuple_element_t <0 , std::tuple<RestT...>>>>;
33443346
33453347 // TODO The handler-less path does not support reductions, and
33463348 // kernel functions with the kernel_handler type argument yet.
@@ -3402,7 +3404,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
34023404 parallel_for (nd_range<Dims> Range, event DepEvent, RestT &&...Rest) {
34033405 constexpr detail::code_location CodeLoc = getCodeLocation<KernelName>();
34043406 detail::tls_code_loc_t TlsCodeLocCapture (CodeLoc);
3405- using KernelType = std::tuple_element_t <0 , std::tuple<RestT...>>;
3407+ using KernelType = std::remove_const_t <
3408+ std::remove_reference_t <std::tuple_element_t <0 , std::tuple<RestT...>>>>;
34063409
34073410 // TODO The handler-less path does not support reductions, and
34083411 // kernel functions with the kernel_handler type argument yet.
@@ -3469,7 +3472,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
34693472 RestT &&...Rest) {
34703473 constexpr detail::code_location CodeLoc = getCodeLocation<KernelName>();
34713474 detail::tls_code_loc_t TlsCodeLocCapture (CodeLoc);
3472- using KernelType = std::tuple_element_t <0 , std::tuple<RestT...>>;
3475+ using KernelType = std::remove_const_t <
3476+ std::remove_reference_t <std::tuple_element_t <0 , std::tuple<RestT...>>>>;
34733477
34743478 // TODO The handler-less path does not support reductions, and
34753479 // kernel functions with the kernel_handler type argument yet.
0 commit comments