Skip to content

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.

2 participants