diff --git a/src/ifcparse/IfcHierarchyHelper.h b/src/ifcparse/IfcHierarchyHelper.h index 96da792aa8..b7cb5e1e61 100644 --- a/src/ifcparse/IfcHierarchyHelper.h +++ b/src/ifcparse/IfcHierarchyHelper.h @@ -173,13 +173,16 @@ public: bool found = false; for (typename T::list::it i = li->begin(); i != li->end(); ++i) { T* rel = *i; - if (get_parent_of_relation(rel) == relating_object) { - IfcEntityList::ptr products = get_children_of_relation(rel); - products->push(related_object); - set_children_of_relation(rel, products); - found = true; - break; - } + try { + if (get_parent_of_relation(rel) == relating_object) { + IfcEntityList::ptr products = get_children_of_relation(rel); + products->push(related_object); + set_children_of_relation(rel, products); + found = true; + break; + } + } + catch (...) { /* */ } } if (! found) { if (! owner_hist) { diff --git a/src/ifcparse/IfcSIPrefix.cpp b/src/ifcparse/IfcSIPrefix.cpp index 95bfc51c98..565f525ca8 100644 --- a/src/ifcparse/IfcSIPrefix.cpp +++ b/src/ifcparse/IfcSIPrefix.cpp @@ -73,8 +73,16 @@ double IfcParse::get_SI_equivalent(typename Schema::IfcNamedUnit* named_unit) { return scale; } +#if _MSC_VER < 1900 +template double IfcParse::get_SI_equivalent(Ifc2x3::IfcNamedUnit* named_unit); +template double IfcParse::get_SI_equivalent(Ifc4::IfcNamedUnit* named_unit); +template double IfcParse::get_SI_equivalent(Ifc4x1::IfcNamedUnit* named_unit); +template double IfcParse::get_SI_equivalent(Ifc4x2::IfcNamedUnit* named_unit); +template double IfcParse::get_SI_equivalent(Ifc4x3_rc1::IfcNamedUnit* named_unit); +#else template double IfcParse::get_SI_equivalent(typename Ifc2x3::IfcNamedUnit* named_unit); template double IfcParse::get_SI_equivalent(typename Ifc4::IfcNamedUnit* named_unit); template double IfcParse::get_SI_equivalent(typename Ifc4x1::IfcNamedUnit* named_unit); template double IfcParse::get_SI_equivalent(typename Ifc4x2::IfcNamedUnit* named_unit); template double IfcParse::get_SI_equivalent(typename Ifc4x3_rc1::IfcNamedUnit* named_unit); +#endif