[PARSE BUG]: Explicit instantiations of function templates cannot be parsed
Function templates can be explicitly instantiated (including those with inferred template parameters), but cxxheaderparser will not have it.
Per https://github.com/robotpy/cxxheaderparser/blob/544c253a77d0f706418ee61b986c2b246d4eaf1f/cxxheaderparser/parser.py#L738 all instantiations must be class or struct, and the TemplateInst type seems to assume this also.
https://en.cppreference.com/w/cpp/language/function_template explicit instantiation
https://coliru.stacked-crooked.com/a/15000b7567cd61ca <- compiles fine
Please post an example of the code that can't be parsed in this issue, thanks!
https://coliru.stacked-crooked.com/a/15000b7567cd61ca is the example
#include <iostream>
template <typename T> T tFunction(T val);
template <typename T> T tFunction(T val) {
return val;
}
template bool tFunction(bool val);
Specifically, template bool tFunction(bool val); doesn't work in cxxheaderparser, but godbolt seems to accept it.
That's a weird declaration.