Added partial specialization handling

This commit is contained in:
Bartek Kryza
2021-03-11 00:17:14 +01:00
parent ffed3fef1a
commit 3e4590641a
6 changed files with 147 additions and 17 deletions

View File

@@ -194,12 +194,15 @@ struct diagram {
std::string usr_to_name(const std::vector<std::string> &using_namespaces,
const std::string &usr) const
{
if (usr.empty())
throw std::runtime_error("Empty USR");
for (const auto &c : classes) {
if (c.usr == usr)
return c.full_name(using_namespaces);
}
throw std::runtime_error("Cannot resolve USR: " + usr);
return usr;
}
};
}