We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0a396b commit 590ed41Copy full SHA for 590ed41
sycl/include/CL/sycl/handler.hpp
@@ -386,10 +386,16 @@ class __SYCL_EXPORT handler {
386
static_cast<int>(AccessTarget), ArgIndex);
387
}
388
389
+ template <typename T> struct ShouldEnableSetArgHelper {
390
+ static constexpr bool value = std::is_trivially_copyable<T>::value
391
+#if CL_SYCL_LANGUAGE_VERSION <= 121
392
+ && std::is_standard_layout<T>::value
393
+#endif
394
+ ;
395
+ };
396
+
397
template <typename T>
- typename std::enable_if<std::is_trivially_copyable<T>::value &&
- std::is_standard_layout<T>::value,
- void>::type
398
+ typename std::enable_if<ShouldEnableSetArgHelper<T>::value, void>::type
399
setArgHelper(int ArgIndex, T &&Arg) {
400
void *StoredArg = (void *)storePlainArg(Arg);
401
0 commit comments