diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index c77fa10d4e26f..638ad7043972c 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -848,8 +848,7 @@ class __SYCL_EXPORT handler { /// kernel bundle contains. #ifdef __INTEL_PREVIEW_BREAKING_CHANGES void verifyUsedKernelBundle(const std::string &KernelName) { - detail::string_view Name(KernelName); - verifyUsedKernelBundleInternal(Name); + verifyUsedKernelBundleInternal(detail::string_view{KernelName}); } void verifyUsedKernelBundleInternal(detail::string_view KernelName); #else