sofa
sofa copied to clipboard
[Core] Proposition to reduce the number of alias declarations
The goal is to reduce the number of alias declarations. I propose 2 methods:
- using traits (for example
DataVecCoord_t<Out>). This is illustrated inMulti2Mapping. - ~~using a set of macros. The aliases are still declared, but it is hidden inside the macro.~~
I find the trait approach elegant (nothing is hidden and no use of macro or additional code), but too much verbose when only one template parameter is available (e.g. TetrahedronFEMForceField).
The advantage of the macro is that it does not require changes in the code other than the alias declarations.
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if
- it builds with SUCCESS for all platforms on the CI.
- it does not generate new warnings.
- it does not generate new unit test failures.
- it does not generate new scene test failures.
- it does not break API compatibility.
- it is more than 1 week old (or has fast-merge label).
[ci-build][with-all-tests]