Skip to content
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

Should we drop special treatment for Vector and Matrix? #164

Closed
varunagrawal opened this issue Mar 6, 2024 · 0 comments · Fixed by #165
Closed

Should we drop special treatment for Vector and Matrix? #164

varunagrawal opened this issue Mar 6, 2024 · 0 comments · Fixed by #165
Assignees
Labels
question Further information is requested

Comments

@varunagrawal
Copy link
Collaborator

Currently the interface parser has a lot of special conditions for Vector and Matrix types.
For example, in type.py, we check if the type is a Matrix or Vector type and always add a const qualifier as well as a & type.

One case where this is problematic is if we have an argument std::vector<Matrix>& which the parser converts to std::vector<const Matrix&>& which then fails compilation.

Should we drop this special behavior in favor of providing that control to the writer of the .i file? It is a bit more work for the end-user but gives them a lot more flexibility while being more transparent in case of failure.

The good news is that this change would NOT be API breaking since the change is opaque to downstream code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants