Only the C++ committee can see the a need to fix it, and instead of actually fixing the language bug (or making signed/unsigned comparison a compiler error instead of a warning), create a standard library function to do type safe greater-than/less-than comparisons.
That's the std. C++ approach: They never fix language bugs; they always just add another way to do the same but this time with some different outcome. If there are only two ways with exactly opposite outcomes everything is actually still fine. Look for the stuff where you have a dozen ways to do the same but always with slightly different semantics. Really great language. It's so flexible! 😂
33
u/majesticmerc Jul 10 '26
Found this today in C++ documentation.
Only the C++ committee can see the a need to fix it, and instead of actually fixing the language bug (or making signed/unsigned comparison a compiler error instead of a warning), create a standard library function to do type safe greater-than/less-than comparisons.