diff --git a/sycl/source/detail/kernel_bundle_impl.hpp b/sycl/source/detail/kernel_bundle_impl.hpp index 15fd5dca3b885..82a14b1ad7a01 100644 --- a/sycl/source/detail/kernel_bundle_impl.hpp +++ b/sycl/source/detail/kernel_bundle_impl.hpp @@ -530,8 +530,10 @@ class kernel_bundle_impl { for (const auto &DeviceGlobalProp : RawImg->getDeviceGlobals()) { std::string_view DeviceGlobalName{DeviceGlobalProp->Name}; assert(DeviceGlobalName.find(Prefix) == 0); - auto [It, Ins] = DeviceGlobalIDSet.emplace(DeviceGlobalName); - if (Ins) { + bool Inserted = false; + std::tie(std::ignore, Inserted) = + DeviceGlobalIDSet.emplace(DeviceGlobalName); + if (Inserted) { DeviceGlobalIDVec.emplace_back(DeviceGlobalName); DeviceGlobalName.remove_prefix(PrefixLen); DeviceGlobalNames.emplace_back(DeviceGlobalName);