diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 4f7ab5ecba..ea1d93bafe 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -1038,7 +1038,7 @@ namespace IfcGeom { ifc_product = ifc_entity->as(); parent_id = -1; try { - IfcSchema::IfcObjectDefinition* parent_object = kernel.get_decomposing_entity(ifc_product)->template as(); + auto parent_object = kernel.get_decomposing_entity(ifc_product); if (parent_object) { parent_id = parent_object->data().id(); }