copy and swap (c++ idiom) indepth
copy and swap (revisit with emphasis on deep copy vs move semantics)