[libc-commits] [libc] [llvm] Improve qsort (PR #120450)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Dec 18 11:26:56 PST 2024


================
@@ -27,11 +27,46 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace internal {
 
+template <typename A, typename F> void sort_inst(A &array, const F &is_less) {
----------------
michaelrj-google wrote:

Naming the comparison `is_less` is a bit confusing since it's not a binary comparison. The comparison function returns a positive, negative, or zero integer if the first element is greater than, less than, or equal to.

https://github.com/llvm/llvm-project/pull/120450


More information about the libc-commits mailing list