
14 Dec
2012
14 Dec
'12
5:43 a.m.
It's historical: length() can be used with the "special" values -1 and -2 to obtain the length of prefix() and suffix(), that's deprecated, and I don't *think* it's documented anywhere anymore, but was retained for backwards compatibility.
I guess after all this time it could be changed now, but I don't see it's causing any great harm either,
I see that the standard says: difference_type length(size_type sub = 0) const; difference_type position(size_type sub = 0) const; Frédéric