On Wednesday, 16 March 2016 at 22:07:39 UTC, Anonymouse wrote:

size_t pos = "banana".indexOf("c");
if (pos > 0) {

Although I also think it makes sense to warn (in specific cases) about mixed-sign comparisons, the example you give here does nothing that we can warn about. It is a comparison of an unsigned "pos" with a literal that is unsigned too. ("0" literal must be considered signed and unsigned without any warnings)

Reply via email to