3 ms·
How many objects of negative size are you typically dealing with?
by microtherion 5y ago
How many objects of negative size are you typically dealing with?
- flohofwoe 5y agoThis isn't the problem, but that it almost always makes sense to use signed math for computations (including computations that involve sizes). And mixed-sign-math in a language that doesn't have robust over/underflow detection but implicit conversion between signed and unsigned is usually a very bad idea. The only advantage that an unsigned size_t gives is one bit more range (but these days this is irrelevant - 63 bits ought to be enough for anyone). But this topic really has been discussed to death in the last decade or so :)