Skip to content

Commit 7a35089

Browse files
[SYCL] Fix a warning after #17838 (#17920)
1 parent bace529 commit 7a35089

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,8 +1609,10 @@ class __SYCL_EXPORT handler {
16091609
MergedProps...>(
16101610
std::forward<decltype(args)>(args)...);
16111611
} else {
1612-
// Always false, but template-dependent.
1613-
static_assert(WrapAsVal != WrapAsVal, "Unexpected WrapAsVal");
1612+
// Always false, but template-dependent. Can't compare `WrapAsVal`
1613+
// with itself because of `-Wtautological-compare` warning.
1614+
static_assert(!std::is_same_v<KernelName, KernelName>,
1615+
"Unexpected WrapAsVal");
16141616
}
16151617
};
16161618
if constexpr (detail::KernelLambdaHasKernelHandlerArgT<

0 commit comments

Comments
 (0)