Using compiler-generated special class member functions and the Big Five

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset