acquired during the use of the object this includes calling delete for any corresponding newsclosing any files that were openedand so on the default simply applies the destructor on each data member copy constructor and move constructor there are two special constructors that are required to construct new objectinitialized to the same state as another object of the same type these are the copy constructor if the existing object is an lvalueand the move constructor if the existing object is an rvalue ( temporary that is about to be destroyed anywayfor any objectsuch as an intcell objecta copy constructor or move constructor is called in the following instancesr declaration with initializationsuch as intcell /copy construct if is lvaluemove construct if is rvalue intcell }/copy construct if is lvaluemove construct if is rvalue but not /assignment operatordiscussed later an object passed using call-by-value (instead of by or const &)whichas mentioned earliershould rarely be done anyway an object returned by value (instead of by or const &againa copy constructor is invoked if the object being returned is an lvalueand move constructor is invoked if the object being returned is an rvalue by defaultthe copy constructor is implemented by applying copy constructors to each data member in turn for data members that are primitive types (for instanceintdoubleor pointers)simple assignment is done this would be the case for the storedvalue data member in our intcell class for data members that are themselves class objectsthe copy constructor or move constructoras appropriatefor each data member' class is applied to that data member copy assignment and move assignment (operator=the assignment operator is called when is applied to two objects that have both been previously constructed lhs=rhs is intended to copy the state of rhs into lhs if rhs is an lvaluethis is done by using the copy assignment operatorif rhs is an rvalue ( temporary that is about to be destroyed anyway)this is done by using the move assignment operator by defaultthe copy assignment operator is implemented by applying the copy assignment operator to each data member in turn defaults if we examine the intcell classwe see that the defaults are perfectly acceptableso we do not have to do anything this is often the case if class consists of data members that are exclusively primitive types and objects for which the defaults make sensethe class defaults will usually make sense thus class whose data members are intdoublevectorstringand even vector can accept the defaults