set::key_comp

key_compare key_comp() const;

The member function returns the stored function object that determines the order of elements in the controlled sequence. The stored object defines the member function:

bool operator(const Key& x, const Key& y);

which returns true if x strictly precedes y in the sort order.

See the related sample program.