From 27b9689e145ccb9df494ab28cbbf145d8b033771 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 14 Dec 2018 12:14:12 +0100 Subject: [PATCH] Work-around gcc issue --- src/ifcparse/IfcFile.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/ifcparse/IfcFile.h b/src/ifcparse/IfcFile.h index db852a8d98..f23bf9c7a0 100644 --- a/src/ifcparse/IfcFile.h +++ b/src/ifcparse/IfcFile.h @@ -22,6 +22,7 @@ #include #include +#include #include #include "ifc_parse_api.h" @@ -227,13 +228,15 @@ IFC_PARSE_API IfcFile* parse_ifcxml(const std::string& filename); } -template <> -struct std::iterator_traits { - typedef ptrdiff_t difference_type; - typedef const IfcParse::declaration* value_type; - typedef const IfcParse::declaration*& reference; - typedef const IfcParse::declaration** pointer; - typedef std::forward_iterator_tag iterator_category; -}; +namespace std { + template <> + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef const IfcParse::declaration* value_type; + typedef const IfcParse::declaration*& reference; + typedef const IfcParse::declaration** pointer; + typedef std::forward_iterator_tag iterator_category; + }; +} #endif