std1.0.0-beta-7 SafeC docs

std :: collections::vec

Function std::vec_sort_by

#include <std/collections/vec.h> source

generic<T, C: Order> void vec_sort_by(&Vec<T> v, C ord)

Sorts by a compile-time ordering (an Order: Less<T>, Greater<T>, or your own struct with 'int cmp(const &T, const &T) const'): every comparison is a direct call the optimizer inlines, unlike sort()'s function pointer.