Medium
Guard copy-assignment against self-assignment
Fill in the blank so that buf = buf; doesn't corrupt the object.
main.cpp
Buffer& Buffer::operator=(const Buffer& other) { if () { return *this; } delete[] data_; data_ = new int[other.size_]; std::copy(other.data_, other.data_ + other.size_, data_); size_ = other.size_; return *this;}89 of 117 in C++