Add cpp_scope_name to support templated scopes

This commit is contained in:
Jonathan Müller 2017-04-13 11:58:52 +02:00
commit 06cf090b35
7 changed files with 75 additions and 15 deletions

View file

@ -38,7 +38,9 @@ cpp_entity_kind cpp_enum::do_get_entity_kind() const noexcept
return kind();
}
type_safe::optional<std::string> cpp_enum::do_get_scope_name() const
type_safe::optional<cpp_scope_name> cpp_enum::do_get_scope_name() const
{
return scoped_ ? type_safe::make_optional(name()) : type_safe::nullopt;
if (scoped_)
return type_safe::ref(*this);
return type_safe::nullopt;
}