Comment Re:Same thing happend to Audi a few years ago (Score 1) 1146
In switch statements, it's interesting how enlightening putting this in the default case can be:
cout "This should never be seen\n";
And by all apparent logic, it shouldn't. Should be impossible to get the right value into the right variable.
Of course, there is always some silly error, or "this will work ok" shortcut, or maybe "screw it, I'll fix it later I'm on a deadline", and those messages get seen.
I do find defaults like this to be very useful though, if I don't need the default for something else it can be a very fast way to find subtle but serious bugs in the code. I'll use the default for something else if the problem warrants, but "impossible" values get assigned often enough that I find this to be a good "default default".