When using C++11 or higher, the compiler will auto-generate certain functions for your C++ classes if you do not explicitly provide them in the class definition. In this recipe, we will explore how this works, which functions the compiler will create for you, and how this affects your program's performance and validity. In general, the goal of this recipe is to make the case that every class should, at a minimum, have the Big Five defined to ensure your class is explicit about how you wish to manage resources.
Using compiler-generated special class member functions and the Big Five
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including installing Ubuntu 18.04 or higher...