Shallow Copy vs. Deep Copy

When we make a shallow copy, we are merely storing the references of the objects to the original memory address. If you don’t define a Move Assignment Operator, then it will simply be a shallow copy, unless you implement your own deep copy implementation.

  • shallow copy = storing the references of objects to the original memory address (think of it like physical copy)
  • deep copy = making a new and separate copy of an entire object with its unique memory address (think of it like logical copy)

Source: https://www.interviewbit.com/cpp-interview-questions/