diff --git a/src/Parser/ASTConverter.cs b/src/Parser/ASTConverter.cs index f3d6459f..4d95df4c 100644 --- a/src/Parser/ASTConverter.cs +++ b/src/Parser/ASTConverter.cs @@ -1038,7 +1038,11 @@ namespace CppSharp { var decl = ctx.GetNamespaces(i); var _decl = Visit(decl) as AST.Namespace; - _ctx.Declarations.Add(_decl); + // HACK: we have an irreproducible case where an STD name-space is added to a custom header + if (_decl.Namespace == _ctx) + { + _ctx.Declarations.Add(_decl); + } } for (uint i = 0; i < ctx.EnumsCount; ++i)