Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of my bachelorthesis I worked on exending Autocxx's support for polymorphism, specifically subtype polymorphism.
This allows non-virtual methods to be called on child class objects as well as using child class references as baseclass refernce parameters values.
Currently only 75% of the tests are passing so I wanted to get an image of if you think this is worth fixing up.
The way I implemented it was as post processing after the last step before codegen:
Methods get implemented on a extension trait which is implemented for all childclasses.
Furthermore functions with reference parameters get wrapped in a function that takes a impl-type parameter.
This process is currently disabled for virtual functions with reference parameters.
For examples of what this allows please check out: https://git.yasupa.de/jasper3108/BA-2/src/branch/master/Abgabe/ch7/src/main.rs and https://git.yasupa.de/jasper3108/BA-2/src/branch/master/Abgabe/ch7/src/header.hpp for the C++ code.
My CLA is already applied but im still waiting for it.
Jasper W.