Skip to content

Redundant copy in rvalue ref overload of convolution #167

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

Closed
RezwanArefin01 opened this issue Jul 29, 2023 · 1 comment · Fixed by #168
Closed

Redundant copy in rvalue ref overload of convolution #167

RezwanArefin01 opened this issue Jul 29, 2023 · 1 comment · Fixed by #168

Comments

@RezwanArefin01
Copy link
Contributor

An rvalue reference passed to a function is a lvalue inside the function, and still requires move() to mark it as an rvalue when passing to other functions. A demo can be seen here: https://godbolt.org/z/j4bbP58MY.

Current rvalue ref overload of convolution makes a copy when passing to internal functions, which undermines the existance of the rvalue ref overload.

@yosupo06
Copy link
Collaborator

ah nice catch

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 a pull request may close this issue.

2 participants