mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
constexpr more cases to prevent gcc calling non-existing template overloads
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user