[libc-commits] [libc] [llvm] [libc] Improve qsort (PR #120450)
Lukas Bergdoll via libc-commits
libc-commits at lists.llvm.org
Thu Dec 19 12:00:13 PST 2024
================
@@ -18,11 +18,12 @@ namespace internal {
// A simple in-place heapsort implementation.
// Follow the implementation in https://en.wikipedia.org/wiki/Heapsort.
-LIBC_INLINE void heap_sort(const Array &array) {
- size_t end = array.size();
+template <typename A, typename F>
+void heap_sort(const A &array, const F &is_less) {
----------------
Voultapher wrote:
I'm surprised that template function should be marked with `inline`, AFAIK they can't run into ODR issues, or is this about giving the compiler an inlining hint?
https://github.com/llvm/llvm-project/pull/120450
More information about the libc-commits
mailing list