Skip to content

Commit ea65509

Browse files
authored
[SYCL] Fix noexcept mismatch in HostKernel destructors (#19679)
Marked base and derived destructors as noexcept to resolve compiler error: exception specification of overriding function is more lax than base version.
1 parent d569e12 commit ea65509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/include/sycl/detail/cg_types.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class HostKernelBase {
151151
// Return pointer to the lambda object.
152152
// Used to extract captured variables.
153153
virtual char *getPtr() = 0;
154-
virtual ~HostKernelBase() = default;
154+
virtual ~HostKernelBase() noexcept = default;
155155
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
156156
// NOTE: InstatiateKernelOnHost() should not be called.
157157
virtual void InstantiateKernelOnHost() = 0;
@@ -169,7 +169,7 @@ class HostKernel : public HostKernelBase {
169169

170170
char *getPtr() override { return reinterpret_cast<char *>(&MKernel); }
171171

172-
~HostKernel() = default;
172+
~HostKernel() noexcept override = default;
173173

174174
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
175175
// This function is needed for host-side compilation to keep kernels

0 commit comments

Comments
 (0)