Add is_templated() helper
This commit is contained in:
parent
dc290415f1
commit
67f247533c
6 changed files with 26 additions and 4 deletions
|
|
@ -8,6 +8,15 @@
|
|||
|
||||
using namespace cppast;
|
||||
|
||||
bool cppast::is_templated(const cpp_entity& e) noexcept
|
||||
{
|
||||
if (!e.parent())
|
||||
return false;
|
||||
else if (!is_template(e.parent().value().kind()))
|
||||
return false;
|
||||
return e.parent().value().name() == e.name();
|
||||
}
|
||||
|
||||
std::string cppast::full_name(const cpp_entity& e)
|
||||
{
|
||||
if (e.name().empty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue