Код: Выделить всё
vector to_be_sorted;
std::sort(to_be_sorted.begin(), to_be_sorted.end(), [](const auto &lhs, const auto &rhs) { /* sort code* /});
Я использую GCC13 в режиме C++20.
Подробнее здесь: https://stackoverflow.com/questions/793 ... tor-ranges
Мобильная версия