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

[parallel.simd.reference] Fix swap value_type params to be lvalues #84

Merged
merged 1 commit into from Mar 7, 2019

Conversation

ex-bart
Copy link

@ex-bart ex-bart commented Feb 7, 2019

In the class definition of simd::reference the value_type parameters for
swap() are rvalue references. This does not make sense; swap() must
accept lvalue-references to value_type to be able to exchange the referred
values.

The detailed description of swap() in §16 already correctly uses
lvalue-references for the value_type parameters.

Also, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0214r9.pdf uses
lvalue-reference value_type parameters already in the swap() declaration
in the definition of the simd::reference class.

In the class definition of `simd::reference` the `value_type` parameters for
`swap()` are rvalue references.  This does not make sense; `swap()` must
accept lvalue-references to `value_type` to be able to exchange the referred
values.

The detailed description of `swap()` in §16 already correctly uses
lvalue-references for the `value_type` parameters.

Also, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0214r9.pdf uses
lvalue-reference `value_type` parameters already in the `swap()` declaration
in the definition of the `simd::reference` class.
@jaredhoberock jaredhoberock merged commit 1a41318 into cplusplus:v2 Mar 7, 2019
@jaredhoberock
Copy link
Contributor

Merged. Thanks!

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.

None yet

2 participants