I know that using copy and swap to define assignment operators ensures exception security and avoids self assignment. However, when a large number of move assignments are used, copy and swap will cause performance waste:Why is it not efficient to use a single assignment operator handling both copy and move assignment? When should I use copy and swap and define copy / move assignment operators separately?
Aucun commentaire:
Enregistrer un commentaire