Skip to content

Commit 9073c66

Browse files
committed
[parallel.simd.reference] Fix swap value_type params to be lvalues
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.
1 parent 0911983 commit 9073c66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/simd.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,8 @@
823823
value_type operator--(int) && noexcept;
824824

825825
friend void swap(reference&& a, reference&& b) noexcept;
826-
friend void swap(value_type&& a, reference&& b) noexcept;
827-
friend void swap(reference&& a, value_type&& b) noexcept;
826+
friend void swap(value_type& a, reference&& b) noexcept;
827+
friend void swap(reference&& a, value_type& b) noexcept;
828828
};
829829
\end{codeblock}
830830

0 commit comments

Comments
 (0)