programminga general overview void swapdouble xdouble double tmp xx yy tmpvoid swapvector xvector vector tmp xx yy tmpfigure swapping by three copies void swapvector xvector vector tmp static_cast &&> ) static_cast &&> ) static_cast &&>tmp )void swapvector xvector vector tmp std::movex ) std::movey ) std::movetmp )figure swapping by three movesfirst with type castsecond using std::move the big-fivedestructorcopy constructormove constructorcopy assignment operator=move assignment operatorin ++ classes come with five special functions that are already written for you these are the destructorcopy constructormove constructorcopy assignment operatorand move assignment operator collectively these are the big-five in many casesyou can accept the default behavior provided by the compiler for the big-five sometimes you cannot destructor the destructor is called whenever an object goes out of scope or is subjected to delete typicallythe only responsibility of the destructor is to free up any resources that were