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

@ -60,6 +60,12 @@ namespace cppast
return inline_;
}
/// \returns Whether or not the namespace is anonymous.
bool is_anonymous() const noexcept
{
return name().empty();
}
private:
cpp_namespace(std::string name, bool is_inline)
: cpp_entity(std::move(name)), inline_(is_inline)