Fix issue when parsing anonymous namespaces

This commit is contained in:
Jonathan Müller 2017-04-10 21:02:23 +02:00
commit 75fbc577ad
3 changed files with 25 additions and 2 deletions

View file

@ -27,9 +27,12 @@ namespace
skip_attribute(stream);
// <identifier> {
// or when anonymous: {
if (detail::skip_if(stream, "{"))
return cpp_namespace::builder("", is_inline);
auto& name = stream.get().value();
skip(stream, "{");
return cpp_namespace::builder(name.c_str(), is_inline);
}
}