How to implement logic of the set sorting ?

I want to implement the logic of std::set in c++, for example (example is different from the std::set) in the sort function you can pass additional parameter which is a boolean function name, the function decides on which base to sort the array/vector/etc...

Is there something like this for the std::set ??

http://www.cplusplus.com/reference/set/set/
Internally, the elements in a set are always sorted following a specific strict weak ordering criterion indicated by its internal comparison object (of type Compare).
Topic archived. No new replies allowed.