Copy Assignment
`T& operator=(const T& other)` replaces an existing object's contents with a copy.
Intermediate
Handle self-assignment; the copy-and-swap idiom gives strong exception safety.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.