From c29e6ca2e7d0954bf6cc51c144b17df239d8f54d Mon Sep 17 00:00:00 2001 From: dellaert Date: Fri, 19 Dec 2014 16:19:02 +0100 Subject: [PATCH] Fixed subtle (imperative!) bug where a forward declaration was partially parsed as a class, only then as a forward declaration. --- wrap/Module.cpp | 1 + wrap/tests/geometry.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wrap/Module.cpp b/wrap/Module.cpp index 55fd13715..092c732f7 100644 --- a/wrap/Module.cpp +++ b/wrap/Module.cpp @@ -156,6 +156,7 @@ void Module::parseMarkup(const std::string& data) { >> (*(basic.namespace_p >> str_p("::")) >> basic.className_p)[assign_a(fwDec.name)] >> ch_p(';') [push_back_a(forward_declarations, fwDec)] + [assign_a(cls,cls0)] // also clear class to avoid partial parse [assign_a(fwDec, fwDec0)]; Rule module_content_p = basic.comments_p | include_p | class_p diff --git a/wrap/tests/geometry.h b/wrap/tests/geometry.h index 78e2a1dff..69bc7e3be 100644 --- a/wrap/tests/geometry.h +++ b/wrap/tests/geometry.h @@ -1,7 +1,7 @@ // comments! class VectorNotEigen; -class ns::OtherClass; +virtual class ns::OtherClass; namespace gtsam {