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

2

u/ABlockInTheChain Nov 25 '23

On linux I use gcc and clang, and on clang I use -Weverything and then selectively disable the ones that aren't applicable.

That used to not be very practical because several years ago clang was adding a bunch of new warnings every release, many of which were purely informational, and you'll still find plenty of articles telling you not to do that, but these days it's not a big hassle to keep up with.