Refactored template specialization matching

This commit is contained in:
Bartek Kryza
2023-04-05 21:57:44 +02:00
parent cb74864d0d
commit 38928cf86f
11 changed files with 174 additions and 126 deletions

View File

@@ -111,15 +111,13 @@ bool class_::is_abstract() const
[](const auto &method) { return method.is_pure_virtual(); });
}
int class_::calculate_template_specialization_match(
const class_ &other, const std::string &full_name) const
int class_::calculate_template_specialization_match(const class_ &other) const
{
int res{0};
const std::string left = name_and_ns();
// TODO: handle variadic templates
if ((left != full_name) ||
(templates().size() != other.templates().size())) {
if (left != other.name_and_ns()) {
return res;
}