10 namespace swift::misc::private_ns
15 std::iota(result.begin(), result.end(), 0);
16 result.erase(std::remove_if(result.begin(), result.end(), std::not_fn(predicate)), result.end());
23 std::iota(result.begin(), result.end(), 0);
24 std::sort(result.begin(), result.end(), cmp);
QVector< int > sortIndices(int size, const std::function< bool(int, int)> &cmp)
Decouple sorting from value type.
QVector< int > findIndices(int size, const std::function< bool(int)> &predicate)
Decouple finding from value type.