r/cpp • u/stanimirov • Jul 04 '18
Be Mindful with Compiler-Generated Move Constructors
https://ibob.github.io/blog/2018/07/03/compiler-generated-move/
90
Upvotes
r/cpp • u/stanimirov • Jul 04 '18
View all comments
Show parent comment
5
u/guepier Bioinformatican Jul 04 '18
I’m probably being thick but this isn’t obvious to me: is this because they need to allocate memory? If so, why? Can’t they simply move the relevant pointers?