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

max: pd: fix that both message and audio processor factories were ins… #59

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

jcelerier
Copy link
Member

…tantiated when only one is needed

This caused build errors due to some objects being rightfully incompatible with either backend.
To solve this, we defer instantation of the type inside a templated lambda, so that the if constexpr branch actually behaves with the expected template semantics, with the unused branch not being seen by template instantiation, unlike the previous case in a non-template function causing all branches to be instantiated even if optimized-out afterwards.

…tantiated when only one is needed

This caused build errors due to some objects being rightfully incompatible with
either backend.
To solve this, we defer instantation of the type inside a templated lambda, so that
the `if constexpr` branch actually behaves with the expected template semantics,
with the unused branch not being seen by template instantiation, unlike the previous case
in a non-template function causing all branches to be instantiated even if optimized-out afterwards.
@jcelerier jcelerier force-pushed the fix/template_instantiation_max branch from bf4c802 to 22d5bce Compare December 23, 2024 16:40
@jcelerier jcelerier merged commit 59eb477 into main Dec 23, 2024
7 checks passed
@jcelerier jcelerier deleted the fix/template_instantiation_max branch December 24, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant