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

Fix dangerous usage of std::forward #864

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

stephenswat
Copy link
Member

@stephenswat stephenswat commented Feb 13, 2025

While debugging the CI failures in #859, I found out that the problem was not with my code, but rather that there is a critical failure with the use of std::forward in host_container.hpp, which causes objects passed to push_back as l-value references to be inadvertently converted to r-value references. This commit fixes the bug in host_container.hpp. The nseed_performance_writer.cpp contained a much less serious mistake which I also fixed.

While debugging the CI failures in acts-project#859, I found out that the problem
was not with my code, but rather that there is a critical failure with
the use of `std::forward` in `host_container.cpp`, which causes objects
passed to `push_back` as l-value references to be inadvertently
converted to r-value references. This commit fixes the bug in
`host_container.hpp`. The `nseed_performance_writer.cpp` contained a
much less serious mistake which I also fixed.
@stephenswat stephenswat added the bug Something isn't working label Feb 13, 2025
@stephenswat stephenswat merged commit 5412f1a into acts-project:main Feb 13, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants