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/
88
Upvotes
r/cpp • u/stanimirov • Jul 04 '18
View all comments
8
u/OldWolf2 Jul 04 '18
Sounds like you need a
unique_ptr<std::function<void(int)>>to keep the rule of zero. (/s ... maybe)