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

[Core] Proposition to reduce the number of alias declarations #4788

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alxbilger
Copy link
Contributor

@alxbilger alxbilger commented Jun 24, 2024

The goal is to reduce the number of alias declarations. I propose 2 methods:

  1. using traits (for example DataVecCoord_t<Out>). This is illustrated in Multi2Mapping.
  2. 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).

@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Jun 24, 2024
@alxbilger
Copy link
Contributor Author

[ci-build][with-all-tests]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant