From 59383f5010d5bd1cffc2423148bf84aa4ba972e9 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 24 Jun 2026 11:34:04 +0200 Subject: [PATCH] constexpr more cases to prevent gcc calling non-existing template overloads --- src/ifcparse/IfcSpfHeader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcparse/IfcSpfHeader.cpp b/src/ifcparse/IfcSpfHeader.cpp index 95297720ef..f28c2ea2df 100644 --- a/src/ifcparse/IfcSpfHeader.cpp +++ b/src/ifcparse/IfcSpfHeader.cpp @@ -184,12 +184,17 @@ bool IfcSpfHeader::tryRead() { void IfcParse::IfcSpfHeader::assign(const IfcSpfHeader& other) { if (this != &other) { auto copy_inst = [](IfcUtil::IfcBaseEntity* new_entity, IfcUtil::IfcBaseEntity* entity, const IfcParse::entity* decl, IfcParse::impl::in_memory_file_storage* own_storage, IfcParse::impl::in_memory_file_storage* other_storage) { + if (!new_entity || !entity) { + return; + } for (size_t i = 0; i < decl->attribute_count(); ++i) { entity->data().apply_visitor(other_storage, decl, entity->identity(), [i, decl, new_entity, own_storage](const auto& v) { using U = std::decay_t; if constexpr (std::is_same_v) { } else if constexpr (std::is_same_v) { } else if constexpr (std::is_same_v) { + } else if constexpr (std::is_same_v) { + } else if constexpr (std::is_same_v) { } else { new_entity->set_attribute_value(i, v); }