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/
89
Upvotes
r/cpp • u/stanimirov • Jul 04 '18
View all comments
Show parent comment
-2
u/patlefort Jul 04 '18
A virtual move ctor could try to move if possible or copy if not at runtime, and the copy could throw. It can be worth it to avoid large copies. Of course it will cause problems with standard containers.