r/cpp • • Jul 04 '18

Be Mindful with Compiler-Generated Move Constructors

https://ibob.github.io/blog/2018/07/03/compiler-generated-move/
89 Upvotes

46 comments sorted by

View all comments

Show parent comment

2

u/guepier Bioinformatican Jul 05 '18 edited Jul 05 '18

Thanks for the link. Clearly I need to think about this more because I still don’t see why we couldn’t just swap the sentinels of the moved-to and moved-from object instead of allocating.

Never mind, I just got it.