std::vector<P> people = { P{"jane", 47}, P{"mary", 71}, P{"john", 65} }; ranges::sort(people, [](auto& x, auto& y){ return x.weight > y.weight; });
https://gist.github.com/cieplak/dcd587c67d989768900e4110e776...