Add support for overloaded entity references

This commit is contained in:
Jonathan Müller 2017-03-19 16:07:54 +01:00
commit 08717b2ae7
8 changed files with 197 additions and 47 deletions

View file

@ -183,10 +183,10 @@ namespace cppast
/// \effects Sets the entity that is being templated and the primary template.
cpp_template_specialization(std::unique_ptr<cpp_entity> entity,
const cpp_template_ref& templ)
: cpp_template(std::move(entity)), templ_(templ.id())
: cpp_template(std::move(entity)), templ_(templ.id()[0u])
{
DEBUG_ASSERT(templ.name() == entity->name(), detail::precondition_error_handler{},
"invalid name of template ref");
DEBUG_ASSERT(!templ.is_overloaded() && templ.name() == entity->name(),
detail::precondition_error_handler{}, "invalid name of template ref");
}
private: