Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

use enable_if to allow using containers of interfaces with object wrappers #683

Merged
merged 7 commits into from
Sep 30, 2024

Conversation

m-fila
Copy link
Contributor

@m-fila m-fila commented Sep 20, 2024

BEGINRELEASENOTES

  • Using enable if instead of static_assert in interface type construct to avoid errors with direct initialization of contianers of interface types

ENDRELEASENOTES

key4hep/k4FWCore#238 I spotted that the containers of interface types can't be used in stock Gaudi::Functional algorithms (unlike containers of data types) due to instantiating wrong constructor from the template.
The problem was vector's direct initialization with {std::vector<interface_type>&&} would call the interface type constructor with std::vector<interface_type>&& (failing late due to the assert) rather than vector's constructor. With enable_if the correct overload is chosen due to SFINAE

@m-fila m-fila force-pushed the interface_constructor_select branch 2 times, most recently from 956c6b9 to e1657b2 Compare September 23, 2024 06:56
@m-fila m-fila marked this pull request as ready for review September 23, 2024 08:42
@m-fila m-fila force-pushed the interface_constructor_select branch from adae820 to 3ac6d7b Compare September 26, 2024 14:31
@tmadlener
Copy link
Collaborator

EDM4hep CI failures should be fixed with #690

@tmadlener tmadlener force-pushed the interface_constructor_select branch from d9a0c07 to a1dfb3f Compare September 30, 2024 11:06
@tmadlener
Copy link
Collaborator

I am going to merge this as soon as CI passes. Just to be sure: This one is not immediately needed in a tag, right? Because the discussion that triggered this is still open / not finally settled in k4FWCore either.

@m-fila
Copy link
Contributor Author

m-fila commented Sep 30, 2024

Yes, I think it should be fine to tag it later

@tmadlener tmadlener merged commit 2064274 into AIDASoft:master Sep 30, 2024
18 checks passed
@m-fila m-fila deleted the interface_constructor_select branch September 30, 2024 12:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants