I want to implement the operator "+" with the help of delegation. But when I want to use the "+ =" operator, it cannot find it.
Money Money::operator +=(const Money &m)noexcept
{
rouble += m.rouble;
penny += m.penny;
return *this;
}
Money operator + (const Money &first, const Money &second) noexcept
{
return operator+=(second);
^^^^^^^^^
}