|This rule is Obsolete|
|Synopsis:||Copy assignment operators shall be implemented with the swap idiom|
|Category:||Object Life Cycle|
The swap idiom is considered to be the most clear and efficient implementation of the copy assignment operator. The implementation of the copy assignment operator is as follows:
MyClass& operator=(MyClass other)
Important remark. If the copy assignment operator takes a const reference as argument the swap idiom can't be used.