O'Reilly logo
  • Ben Medina thinks this is interesting:

There is a way to say exactly that: specialize std::swap for Widget.


Cover of Effective C++: 55 Specific Ways to Improve Your Programs and Designs, Third Edition


You can also enable move assign/copy for your type, and moving will be performed, instead of copying.