Closed trelau closed 2 years ago
C++ template expansion is extremely tricky to get fully right. It may look like token pasting, but it really isn't.
pcpp only does token pasting, so whilst it might get you 95% of the way to a C++ template expansion, it most definitely can't carry you the remaining 5%. Sorry.
Could pcpp be used (in theory) to expand templates? I am writing a python binding generator and, while possible to handle templates, it can get quite complex.
Basically, i'd like something like
typedef SomeTemplate<Type> MyNewType
to be expanded to the class templateSomeTemplate
with the template variables filled in so it just looks like a class definition after expansion.