...
This compliant solution avoids self-copy assignment by constructing a temporary object from rhs that is then swapped with *this. This compliant solution can provide provides a strong exception guarantee because swap() will never be called if resource allocation results in an exception being thrown while creating the temporary object.
...