Category Archive for "Copy And Swap"

What is the copy-and-swap idiom?

In C++, the copy-and-swap idiom is a technique used to help implement correct and efficient copy assignment operation for a class. It involves creating a copy constructor and a swa...