SpiceQA
Questions Tags Users Badges

What is the copy-and-swap idiom?

user_87234 0
Created Jul 19, 2010 Edited Jul 19, 2010
Viewed 444762

What is the copy-and-swap idiom and when should it be used? What problems does it solve? Does it change for C++11?

Related:

  • What are your favorite C++ Coding Style idioms: Copy-swap
  • Copy constructor and = operator overload in C++: is a common function possible?
  • What is copy elision and how it optimizes copy-and-swap idiom
  • C++: dynamically allocating an array of objects?
copy-and-swap copy-constructor assignment-operator c++-faq c++
Share
5 Answers
Related
Terms of service Privacy policy
Powered by Answer