constexpr more cases to prevent gcc calling non-existing template overloads

This commit is contained in:
Thomas Krijnen
2026-06-24 11:34:04 +02:00
parent a9d6776875
commit 59383f5010
+5
View File
@@ -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<decltype(v)>;
if constexpr (std::is_same_v<U, IfcUtil::IfcBaseClass*>) {
} else if constexpr (std::is_same_v<U, aggregate_of_instance::ptr>) {
} else if constexpr (std::is_same_v<U, aggregate_of_aggregate_of_instance::ptr>) {
} else if constexpr (std::is_same_v<U, empty_aggregate_t>) {
} else if constexpr (std::is_same_v<U, empty_aggregate_of_aggregate_t>) {
} else {
new_entity->set_attribute_value(i, v);
}