Copy-and-Swap Idiom in C++: What It Is, Why It Matters, and When to Use It | CodeTrail