diff --git a/sycl/include/sycl/detail/cg_types.hpp b/sycl/include/sycl/detail/cg_types.hpp index 843db64dea661..034d93382d202 100644 --- a/sycl/include/sycl/detail/cg_types.hpp +++ b/sycl/include/sycl/detail/cg_types.hpp @@ -151,7 +151,7 @@ class HostKernelBase { // Return pointer to the lambda object. // Used to extract captured variables. virtual char *getPtr() = 0; - virtual ~HostKernelBase() = default; + virtual ~HostKernelBase() noexcept = default; #ifndef __INTEL_PREVIEW_BREAKING_CHANGES // NOTE: InstatiateKernelOnHost() should not be called. virtual void InstantiateKernelOnHost() = 0; @@ -169,7 +169,7 @@ class HostKernel : public HostKernelBase { char *getPtr() override { return reinterpret_cast(&MKernel); } - ~HostKernel() = default; + ~HostKernel() noexcept override = default; #ifndef __INTEL_PREVIEW_BREAKING_CHANGES // This function is needed for host-side compilation to keep kernels