Fixed basic template instantiation relationships

This commit is contained in:
Bartek Kryza
2021-03-25 22:30:21 +01:00
parent 2c2040d95d
commit a8bab3931e
9 changed files with 179 additions and 25 deletions

View File

@@ -91,6 +91,18 @@ std::string fully_prefixed(const cppast::cpp_entity &e)
return fmt::format("{}", fmt::join(res.rbegin(), res.rend(), "::"));
}
const cppast::cpp_type &unreferenced(const cppast::cpp_type &t)
{
if (t.kind() == cppast::cpp_type_kind::pointer_t)
return unreferenced(
static_cast<const cppast::cpp_pointer_type &>(t).pointee());
else if (t.kind() == cppast::cpp_type_kind::reference_t)
return unreferenced(
static_cast<const cppast::cpp_reference_type &>(t).referee());
return t;
}
} // namespace util
} // namespace cx
} // namespace clanguml