mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
missing a return *this in a copy-assignment
This commit is contained in:
parent
faad9d8b56
commit
1e12aba7af
|
@ -21354,6 +21354,7 @@ Besides destructors and deallocation functions, common error-safety techniques r
|
|||
T& T::operator=(const T& other) {
|
||||
auto temp = other;
|
||||
swap(temp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
(See also Item 56. ???)
|
||||
|
|
Loading…
Reference in New Issue
Block a user