diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 64fc7c2f69566..303eb40f48d8b 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -130,8 +130,7 @@ auto submit_kernel_direct( const detail::code_location &CodeLoc = detail::code_location::current()) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); - using KernelType = - std::remove_const_t>; + using KernelType = std::decay_t; using NameT = typename detail::get_kernel_name_t::name; @@ -209,8 +208,7 @@ auto submit_kernel_direct_parallel_for( const PropertiesT &Props = ext::oneapi::experimental::empty_properties_t{}, const detail::code_location &CodeLoc = detail::code_location::current()) { - using KernelType = - std::remove_const_t>; + using KernelType = std::decay_t; using LambdaArgType = sycl::detail::lambda_arg_type>; @@ -3310,7 +3308,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); - using KernelType = std::tuple_element_t<0, std::tuple>; + using KernelType = std::decay_t>; // TODO The handler-less path does not support reductions, and // kernel functions with the kernel_handler type argument yet. @@ -3340,7 +3338,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { parallel_for(nd_range Range, RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); - using KernelType = std::tuple_element_t<0, std::tuple>; + using KernelType = std::decay_t>; // TODO The handler-less path does not support reductions, and // kernel functions with the kernel_handler type argument yet. @@ -3402,7 +3400,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { parallel_for(nd_range Range, event DepEvent, RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); - using KernelType = std::tuple_element_t<0, std::tuple>; + using KernelType = std::decay_t>; // TODO The handler-less path does not support reductions, and // kernel functions with the kernel_handler type argument yet. @@ -3469,7 +3467,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); - using KernelType = std::tuple_element_t<0, std::tuple>; + using KernelType = std::decay_t>; // TODO The handler-less path does not support reductions, and // kernel functions with the kernel_handler type argument yet.