Visual Studio Code – Why Does Visual Studio Give the Warning "Relational Expression As Switch Expression"?
I have the following code: float x = 0.43; float y = 1.56; size_t largerValueIndex = 1; size_t smallerValueIndex = 0; switch (x > y) { case 1: largerValueIndex = 0; smallerValueIndex = 1; break; } Visual Studio issues the…