File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -414,11 +414,14 @@ class kernel_bundle_impl
414414 }
415415 }
416416
417+ // Move the images from the set to images collection.
418+ // Note: Move iterators do not allow moving from sets, so instead we
419+ // need to call extract.
420+ // https://godbolt.org/z/h3YGoPYbr illustrates this limitation.
417421 DevImages.reserve (DevImages.size () + DevImagesSet.size ());
418- for (auto It = std::make_move_iterator (DevImagesSet.begin ()),
419- End = std::make_move_iterator (DevImagesSet.end ());
420- It != End; ++It)
421- DevImages.push_back (createSyclObjFromImpl<device_image_plain>(**It));
422+ for (auto It = DevImagesSet.begin (); It != DevImagesSet.end ();)
423+ DevImages.push_back (createSyclObjFromImpl<device_image_plain>(
424+ *DevImagesSet.extract (It++).value ()));
422425
423426 // Check for conflicting kernels in RTC kernel bundles.
424427 ThrowIfConflictingKernels (DevImages);
You can’t perform that action at this time.
0 commit comments