“If you have a mismatched type in a comparator, C++ will not warn you even with -Weverything.”
Swapping in a faster std::sort in LLVM’s libcxx turned up code everywhere that relied on the order of equal elements, which the standard never promised. The fix was to randomize that order in debug builds and let the tests break. Broken comparators that had “worked” for years went the same way. Hyrum’s Law in practice: every quirk becomes a contract once enough people use it.