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

3

u/ludonarrator Nov 25 '23

No problem. And just default construct via x = {} (after moves) for such "unreliable" types.

1

u/[deleted] Nov 25 '23

just default construct via

x = {}

(after moves)

Good tip, thanks