diff --git a/src/ifcgeom/ConversionResult.h b/src/ifcgeom/ConversionResult.h index f7a380184a..7ce7eb46c7 100644 --- a/src/ifcgeom/ConversionResult.h +++ b/src/ifcgeom/ConversionResult.h @@ -101,11 +101,13 @@ namespace IfcGeom { virtual const void* value_ptr() const = 0; }; +#ifndef SWIG template struct has_exact : std::false_type {}; template struct has_exact().exact())>> : std::true_type {}; +#endif template struct NumberModel : NumberConcept { @@ -130,7 +132,8 @@ namespace IfcGeom { std::stringstream ss; if constexpr (has_exact::value) { ss << value.exact(); - } else if constexpr (std::is_floating_point::value) { + } else { + if constexpr (std::is_floating_point::value) { ss << std::setprecision(std::numeric_limits::digits10 + 1); } ss << value;