Re:Clang emits memcpy for std::swap, which can introduce und...
by Matheus28 on Sunday April 24, 2016 @04:55PM
(#11561338)
A more common case, would be swapping a vector element with the back of the vector and popping it off, which is kinda common.
[ Parent
| on HN ]
Re:Clang emits memcpy for std::swap, which can introduce und...
by plorkyeran on Sunday April 24, 2016 @05:54PM
(#11561538)
It was common pre-C++11, but these days you should just be doing a move and pop rather than a swap and pop.