Open
Description
Brief Description
How can I get function templates specializations (similar to class templates specializations)?
I am using the following code:
foreach (var template in sourceUnit.Templates)
{
if (template is FunctionTemplate ft)
{
foreach(var specialization in ft.Specializations) // always ft.Specializations is empty !!!
{
}
}
else if (template is ClassTemplate ct)
{
foreach (var specialization in ct.Specializations) // ct.Specializations gives back the correct results !!!
{
}
}
else if (template is VarTemplate)
{
}
else if (template is TypeAliasTemplate)
{
}
else
{
}
Kind regards,
Mircea Troi
OS: Windows / OS X / Linux (include version and/or distro)
Windows, latest version.
Used headers
Used settings
Target: MSVC/GCC/Clang
MSVC
Other settings
Stack trace or incompilable generated code
Metadata
Metadata
Assignees
Labels
No labels