In this example I want MSVC to emit a warning:
auto func(float f) -> int {
if(f) { return 654321;} // true if f != 0.0F
else { return 123456; }
}
So that I'm forced to write:
auto func(float f) -> int {
if(f != 0) { return 654321;}
else { return 123456; }
}
Is it possible to make MSVC emit a warning on the implicit conversion in the first example?