> The very concept of operator overloading is incompatible with such a guarantee.
Why would operator overloading allocate memory? The memory is already allocated(by the user) when you call with the operands.
What if I wanted to overload the + operator to concatenate strings?
There is definitely some merit in being puritanical about not having any allocations in operators.
> The very concept of operator overloading is incompatible with such a guarantee.
Why would operator overloading allocate memory? The memory is already allocated(by the user) when you call with the operands.