Reputation: 3487
What is the different between memmove
and c++11 std::move
? Can I use std::move
on overlapped memory location? And which method has the higher speed performance?
Upvotes: 4
Views: 2873
Reputation: 41504
A few ways:
In situations where you're copying POD types to a right-overlapping range, it is likely that memmove and std::move will have similar performance. In all other situations, only one of the two is appropriate, so you can't really compare performance.
Upvotes: 6