sorting:
The elements need to be comparable. The functor option is there, but 'overload operator<' is missing.
I think that stable_sort deserves a reference.
The same examples can be used:
__ first we sort lexicographically, then by the length *
__ first by order, then if they are odd or even
The same about make_heap, sort_heap
¿What about the yo-yo treesort(set) and heapsort(priority_queue) ? Maybe it should be a mention of 'choose the right structure'
@ne555
You're right. stable_sort definitely deserves a reference. We'll see what can be done about that.
As for overload operator<, I chose not to mention that option because of how easily it can be abused. That's mainly why.
As for the different sorting algorithms (I take it that was your complaint? That we didn't mention them?), that's for the /faq/sort-algorithms "Sort stuff myself?" section. ;)
Mmm... no thanks. Aside from the reference to stable sort, I can't see anything I'd really like to change. One of these days, though, I'll need to write a script to extract the cplusplusML (I can't think of anything better to call it) text from the page's HTML code. >_>
I disagree about the < operator abuse problem. Sure, it can be abused -- any operator that can be overloaded can be abused -- but that cannot trump the whole point of lexical comparitors.
The purpose of the < operator is to provide a default comparitor, while the purpose of the std::sort() functor is to sort using a comparitor other than the default.
I haven't had a chance to look through the "sort stuff myself" stuff yet... I hope to get there sometime this weekend. Right now I'm playing with passing N-dimensional arrays to functions.
Alright, I had some surgery this week so I haven't gotten too much done... In addition to the last post (sizeof array and sort stuff), I have updated the Introduction page significantly.