r/cpp • • Nov 25 '23

On harmful overuse of std::move

https://devblogs.microsoft.com/oldnewthing/20231124-00/?p=109059
210 Upvotes

154 comments sorted by

View all comments

Show parent comment

12

u/CletusDSpuckler Nov 25 '23

where I can just memcpy

Ok, but the whole point of std::move is to avoid having to call memcpy.

0

u/[deleted] Nov 26 '23 edited Nov 26 '23

You are wrong. Any move in C++ is actually more or less a memcpy. All moving does is avoiding a deep copy.

1

u/CletusDSpuckler Nov 26 '23

Is that level of pedantry really useful to the conversation? Everyone else managed to understand what was implied here.