Anyone who’s been around a C++ programmer for any length of time has probably realized that we tend to be horrible language lawyers: we only trust the ISO standard describing the language. We certainly would never assume something to work just because the compiler happens to generate code that works right now. If it’s not in the standard, we can’t count on it.
I’m fine with that. It’s often annoying that we have to be so paranoid, that we so often have to double-check that our code not only compiles, not only passes our tests, but also avoids the dreaded Undefined Behavior (where the behavior is not constrained by the standard), but you get used to it. And all in all, being precise and specific when talking to a compiler is probably not a bad habit to get into, regardless of which language you program in.
However, every once in a while, people try to carry the same level of pedantry over into discussions about C++. (more…)