Description
when I call function std::stable_sort() using this compare function, the program crashed.
Reproducible Code and/or Steps
BEFORE:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first >= r.first;
}
AFTER:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first > r.first;
}
>= ---> >
Checklist
Description
when I call function std::stable_sort() using this compare function, the program crashed.
Reproducible Code and/or Steps
BEFORE:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first >= r.first;
}
AFTER:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first > r.first;
}
>= ---> >
Checklist