@@ -1233,7 +1233,10 @@ class apply_individual_instance_visitor {
12331233};
12341234
12351235template <typename T>
1236- void IfcUtil::IfcBaseClass::set_attribute_value (size_t i, const T& t) {
1236+ typename std::enable_if<
1237+ (!(std::is_pointer<T>::value&& std::is_base_of<IfcUtil::IfcBaseClass, typename std::remove_pointer<T>::type>::value) || std::is_same_v<IfcUtil::IfcBaseClass, std::remove_pointer_t <T>>),
1238+ void >::type
1239+ IfcUtil::IfcBaseClass::set_attribute_value (size_t i, const T& t) {
12371240 if constexpr (std::is_same_v<std::decay_t <T>, double >) {
12381241 if (!std::isfinite (t)) {
12391242 throw IfcParse::IfcException (" Only finite values are allowed" );
@@ -1314,7 +1317,10 @@ void IfcUtil::IfcBaseClass::set_attribute_value(size_t i, const T& t) {
13141317}
13151318
13161319template <typename T>
1317- void IfcUtil::IfcBaseClass::set_attribute_value (const std::string& s, const T& t) {
1320+ typename std::enable_if<
1321+ (!(std::is_pointer<T>::value&& std::is_base_of<IfcUtil::IfcBaseClass, typename std::remove_pointer<T>::type>::value) || std::is_same_v<IfcUtil::IfcBaseClass, std::remove_pointer_t <T>>),
1322+ void >::type
1323+ IfcUtil::IfcBaseClass::set_attribute_value (const std::string& s, const T& t) {
13181324 set_attribute_value (declaration ().as_entity ()->attribute_index (s), t);
13191325}
13201326
@@ -2738,6 +2744,12 @@ IfcUtil::IfcBaseClass::IfcBaseClass(IfcEntityInstanceData&& data)
27382744 */
27392745}
27402746
2747+ void IfcUtil::IfcBaseClass::set_attribute_value (size_t i, IfcUtil::IfcBaseClass* p) {
2748+ set_attribute_value<IfcUtil::IfcBaseClass*>(i, p);
2749+ }
2750+ void IfcUtil::IfcBaseClass::set_attribute_value (const std::string& name, IfcUtil::IfcBaseClass* p) {
2751+ set_attribute_value<IfcUtil::IfcBaseClass*>(name, p);
2752+ }
27412753
27422754template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<Blank>(size_t index, const Blank& value);
27432755template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<Derived>(size_t index, const Derived& value);
@@ -2748,7 +2760,7 @@ template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<double>(s
27482760template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::string>(size_t index, const std::string& value);
27492761template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<boost::dynamic_bitset<>>(size_t index, const boost::dynamic_bitset<>& value);
27502762template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<EnumerationReference>(size_t index, const EnumerationReference& value);
2751- template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<IfcUtil::IfcBaseClass*>(size_t index, IfcUtil::IfcBaseClass* const & value);
2763+ // template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<IfcUtil::IfcBaseClass*>(size_t index, IfcUtil::IfcBaseClass* const& value);
27522764template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<int >>(size_t index, const std::vector<int >& value);
27532765template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<double >>(size_t index, const std::vector<double >& value);
27542766template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<std::string>>(size_t index, const std::vector<std::string>& value);
@@ -2767,7 +2779,7 @@ template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<double>(c
27672779template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::string>(const std::string& name, const std::string& value);
27682780template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<boost::dynamic_bitset<>>(const std::string& name, const boost::dynamic_bitset<>& value);
27692781template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<EnumerationReference>(const std::string& name, const EnumerationReference& value);
2770- template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<IfcUtil::IfcBaseClass*>(const std::string& name, IfcUtil::IfcBaseClass* const & value);
2782+ // template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<IfcUtil::IfcBaseClass*>(const std::string& name, IfcUtil::IfcBaseClass* const& value);
27712783template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<int >>(const std::string& name, const std::vector<int >& value);
27722784template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<double >>(const std::string& name, const std::vector<double >& value);
27732785template void IFC_PARSE_API IfcUtil::IfcBaseClass::set_attribute_value<std::vector<std::string>>(const std::string& name, const std::vector<std::string>& value);
0 commit comments