Take a look. It explains what is called the rule of five, which essentially complies with the standard.
Typically, in most cases, the compiler creates default values ββfor the copy constructor, copy destination, transfer destination, and destructor. But, if the programmer defines any of them, then the compiler assumes that the user has encapsulated something in this class that requires his / her special, let's say. destructor. Now that the programmer knows that he needs a destructor, the compiler will know that the programmer knows what is happening and simply does not create default values ββfor the rest (because, based on the assumption that the compiler does, by default they will be erroneous and may even lead to unwanted behavior).
source share