I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.