Skip to content

Commit 92a006c

Browse files
[SYCL] Workaround older MSVC's bug (#20539)
1 parent 7a8c8c7 commit 92a006c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sycl/include/sycl/detail/kernel_launch_helper.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ struct MarshalledProperty<
283283

284284
// Generic implementation for properties with non-template value_t.
285285
template <typename PropertyTy>
286-
struct MarshalledProperty<PropertyTy,
287-
std::void_t<typename PropertyTy::value_t>> {
286+
struct MarshalledProperty<
287+
PropertyTy,
288+
// `std::void_t<typename PropertyTy::value_t>` should be enough, but MSVC
289+
// had a bug: https://godbolt.org/z/TTjsM1cWE
290+
std::enable_if_t<std::is_same_v<typename PropertyTy::value_t,
291+
typename PropertyTy::value_t>>> {
288292
bool MPresent = false;
289293

290294
template <typename InputPropertyTy>

0 commit comments

Comments
 (0)