template<typename T>
struct TBox2
{
}
typedef TBox2<float> FBox2f;
So the template declaration in AST is a CursorKind.CLASS_TEMPLATE
. How can I tell the template is a struct or class ?
> tpl.kind
CursorKind.CLASS_TEMPLATE
> tpl.spelling
'TBox2'
> tpl.displayname
'TBox2<T>'
> tpdef.kind
CursorKind.TYPEDEF_DECL
> tpdef.type.spelling
'FBox2f'
> tpdef.underlying_typedef_typetpdef.underlying_typedef_type.spelling
'TBox2<float>'