Skip to content

[Type] Standardize extern template instantiations for vector#6105

Open
alxbilger wants to merge 1 commit intosofa-framework:masterfrom
alxbilger:externvector
Open

[Type] Standardize extern template instantiations for vector#6105
alxbilger wants to merge 1 commit intosofa-framework:masterfrom
alxbilger:externvector

Conversation

@alxbilger
Copy link
Copy Markdown
Contributor

This PR ensures that the template class vector is generated only once by the compiler for fundamental types such as int, float, std::string etc.


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: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels May 5, 2026
Copy link
Copy Markdown
Contributor

@fredroy fredroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do/post benchmarks with/without the explicit instanciations ?
I remember doing this long time ago with base classes like vector, and got some performance regressions.
I think this can prevent the compiler to inline functions, if you dont compile with LTO

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: fast merge Minor change that can be merged without waiting for the 7 review days 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.

2 participants