diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 96ee4f5a28d94..f6e76ea857475 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -794,8 +794,8 @@ class __SYCL_EXPORT handler { detail::KernelLambdaHasKernelHandlerArgT::value; - MHostKernel.reset( - new detail::HostKernel(KernelFunc)); + MHostKernel = std::make_unique< + detail::HostKernel>(KernelFunc); constexpr bool KernelHasName = detail::getKernelName() != nullptr &&