-
Notifications
You must be signed in to change notification settings - Fork 578
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
@StdVector
default annotation causing Parser
to ignore templated constructors and operator overloads with std::vector
arguments
#735
Comments
There are 2 unrelated bugs involved here:
instead of:
I'm not sure how to fix this, and if it is worth. @saudet any idea ?
but that doesn't work because your class is in the top level namespace and in this case for constructors (and probably operators), an extra qualification by |
Confirmed that this does work.
Would the same change apply to operators? Currently, only normal templated functions can be mapped without specifying parameters. |
Hmm. Are you sure ? I just tested with an operator without specifying the parameter list and it does work, even in the top level namespace. |
Strangely I get this public native @Name("operator =<int>") void operator =(@StdVector @ByVal IntVec vec); from this mapping: infoMap.put(new Info("TemplatedClass<double>::operator =<int>").define()); |
BTW, if you don't need |
Right. So if you replace the I'll try to find a fix for bug 2. |
I don't think we need a fix for that, that's how it's intended to work. |
I'm not sure what you mean by "that". But what I meant by "bug 2" (from post #735 (comment)) should be fixed by PR #739 you are about to merge. Remains the fact (bug 1) that |
If the workaround is good enough for now, probably not worth it, no |
I think so. This is only hit when we have a templated function with overloads and that we need to add a user info with function parameters to instantiate a specific overload.
|
As described in #732. Title pretty much sums it up. Templated constructors and operators (but not plain functions) are ignored when they have
std::vector
as a parameter. The behavior is the same whether or not the class itself is templated.Example:
Header:
InfoMapping:
With line 110 in
InfoMap.java
(.put(new Info("std::vector").annotations("@StdVector"))
) commented out:Without commenting out the line:
The text was updated successfully, but these errors were encountered: