tests: fix the Linux build of ResourceMaterializationTests (#1333)

tests: avoid empty optional::emplace() on IndirectDescriptor (fixes Linux build)

clang with libstdc++ 14 does not treat std::optional<DescriptorSource::IndirectDescriptor>
as default-constructible (nested struct with default member initializers), so the
argument-less emplace() fails to resolve. Pass an explicit value-initialized
IndirectDescriptor, matching the form already used elsewhere in this file.
This commit is contained in:
HamsterCL authored and GitHub committed 2026-10-10 03:47:38 +02:00
1 parent 2f4d0f383e
commit f3836bb831
1 file changed
+1 -1
+1 -1
View File
@@ -243,7 +243,7 @@ void TestSrtAliasesRetainReadPolicy() {
program.descriptor_sources.push_back({.dwords = {Value(&first), Value(0u)},
.dword_count = 2});
DescriptorSource indirect;
indirect.indirect_descriptor.emplace().sources = {0, 1};
indirect.indirect_descriptor.emplace(DescriptorSource::IndirectDescriptor{}).sources = {0, 1};
program.descriptor_sources.push_back(indirect);
auto plan = ExtractResourcePlan(program);
for (const auto &inst : plan.value_storage) {