Using -1 as a flag value for unsigned (size_t) types
-1 will always convert to the max unsigned value, this is due to section 4.7 Integral conversions: If the destination type is unsigned, the resulting value is the least unsigned integer congruent to the source integer (modulo 2n where n is the number of bits used to represent the unsigned type). [ Note: In a … Read more