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

BUG: Misuse of std::forward #394

Open
Phygon opened this issue Apr 8, 2019 · 0 comments
Open

BUG: Misuse of std::forward #394

Phygon opened this issue Apr 8, 2019 · 0 comments

Comments

@Phygon
Copy link

Phygon commented Apr 8, 2019

https://github.com/boost-experimental/di/blob/19c30d5f5bc9946d7684457772fc3aa8b3bd43ef/extension/include/boost/di/extension/injections/factory.hpp#L35

std::forward is misused here, because TArgs&& is not a template argument of the create() function. That means, TArgs&& (all arguments in the parameter pack) are rvalue references, and reference collapsing cannot occur as intended.

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

No branches or pull requests

1 participant