▲ | aw1621107 2 days ago | |
> Even the C people glibc and LLVM libc consider this to be undesirable and are willing to spend 2-3% overhead on making sure you don't get that behavior. libc++ actually had to roll back a std::sort improvement because it broke too much code that was relying on bad comparators. From the RFC for adding comparator checks to debug libc++ [0]: > Not so long ago we proposed and changed std::sort algorithm [1]. However, it was rolled back in 16.0.1 because of failures within the broken comparators. That was even true for the previous implementation, however, the new one exposed the problems more often. [0]: https://discourse.llvm.org/t/rfc-strict-weak-ordering-checks... [1]: https://reviews.llvm.org/D122780 (not the original link, but I think this is the review for the changeset that was rolled back) |