27 Nov
2018
27 Nov
'18
2:05 a.m.
Gavin Lambert wrote:
On 27/11/2018 03:21, Alexander Grund wrote:
I might agree with the size_t mistake: Using it for sizes may be ok, but as an index type might have been wrong.
As an index for a vector or array which cannot have a valid index below zero, it's perfectly fine.
It's not perfectly fine, because you can pass a negative index to it and there's no way to check for that (from within the function). If you take a signed type, you can assert. It seems that we need to go over this at least once per year.