-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add structured support for templates? #171
Comments
Er, nothing special for methods, so I guess they fold under functions with a |
Support for uninstantiated templates has never been a design goal (see #153 (comment)) mainly because it hasn't been necessary for automated wrapper generation. However, support for documentation tools and perhaps some way of automatically generating instantations for wrapping may be sufficient justification.
Bikeshedding: C++ terminology would prefer the names Design considerations include:
Inclusion of templates in the output should be enabled explicitly by option because in some use cases they are not relevant. |
For reference, our current documentation has a FAQ Entry about this. The answer includes some notes relevant here. |
Thanks! All of that makes sense, but just one question:
Can I ask what you mean by this? |
By "representing member relations" I meant things like member templates inside both non-templates and other templates. If we list a template as a member of a non-template class, that could confuse existing clients. We likely need a separate attribute to represent members that are templates. |
FTR Here's a xref to the So yeah, I think we can close this issue for now unless I really run into a feature or performance show-stopper (e.g. C++ -> XML -> pygccxml, performance impact from having to do fully-scoped name lookups for template parameters, after parsing the template name, etc.). |
Okay, we'll close this in favor of other approaches discussed over there. |
This is an upstream version of CastXML/pygccxml#121, towards RobotLocomotion/drake#13670
I've reviewed #20 (and very briefly #11), but I would still like to see if it's possible to get some structured information from templates (e.g. parameter names and values w.r.t. the canonical decl/def.).
As mentioned in the
pygccxml
issue, I would like to see how much can be automated, and I would still like to be able to parse templates themselves, and possibly even cross-reference pure instantiations explicitly.Given that
libclang
exposes this information (albeit a tad awkwardly), I'm sure at least some portion of it can be exposed here?From looking at
clang
, seems like it would exposable, as sayTemplateClass
,TemplateFunction
,TemplateMethod
, etc., somewhere near here?CastXML/src/Output.cxx
Lines 522 to 523 in 8625aed
\cc @jamiesnape
The text was updated successfully, but these errors were encountered: