Safely copying, moving, and destroying objects in Modern C++ with the rule of "all or nothing"

Safely copying, moving, and destroying objects in Modern C++ with the rule of "all or nothing"

Help me keep doing these videos! This works relies on your support! You can show it in one of these ways: 📚 Start a FREE Audible trial: https://www.audibletrial.com/CodeForY... 🛍ïļ Buy gear I use to make this video: https://github.com/cpp-for-yourself/s... ðŸ’ķ Directly become a sponsor on GitHub: https://github.com/sponsors/niosus 📚 Watch my videos to the end and leave comments ⁉ïļ Find your way to support this work here: https://github.com/cpp-for-yourself/s... Which constructors does a C++ class need? Which does it generates on its own? What about various assignment operators? And a destructor? How not to shoot ones leg off and navigate these waters effortlessly? This and more we cover in this video that tells us a simple rule to follow when implementing classes in Modern C++, the rule of "all or nothing". We dive into the reasons for its existence and see how it makes our lives easier. 📚 As always, the script to the video lives here: https://github.com/cpp-for-yourself/s... Related videos and materials: Move semantics video:    â€Ē Re-inventing move semantics in modern C++ ...   Object lifecycle video:    â€Ē C++ object lifecycle 101: the essentials   Raw pointers video:    â€Ē Mastering C++ pointers: the pros and cons ...   Google style on naming: https://google.github.io/styleguide/c... Rule of 5/3/0 on cppreference.com: https://en.cppreference.com/w/cpp/lan... Rule of all or nothing from Arne Mertz blog: https://arne-mertz.de/2015/02/the-rul... CPP Core Guidelines on the rule of 5, rule of 0: http://isocpp.github.io/CppCoreGuidel... The frustrated person video clip is from pexels.com