Re: Interest check: Boost.Algorithm.Statsort — O(n log log n) sorting
Rainer Deyke via Boost <[email protected]>
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3/9/26 23:08, Peter Taraba via Boost wrote:
> Supports any std::is_arithmetic<T> type (int, float, double, etc.)
I don't think I've ever sorted a container of plain numbers in a real
program. However, I have sorted by complex objects by their numeric
attributes fairly often, i.e.:
struct my_complex_type {
std::string name;
int z;
};
std::vector<my_complex_type> my_vector;
std::sort(
my_vector.begin(),
my_vector.end(),
[](auto const &a, auto const &b) { return a.z < b.z; });
Can statsort work with this kind of object?
--
Rainer Deyke - [email protected]
_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/GK2WPCZU5M7Z2LJIR4F4J2D3XLNMY4LE/