Syntax:
#include <algorithm> void sort_heap (random_access_iterator start, random_access_iterator end); void sort_heap (random_access_iterator start, random_access_iterator end, StrictWeakOrdering cmp);
The sort_heap() function turns the heap defined by [start,end) into a sorted range.
If the strict weak ordering comparison function object cmp is given, then it is used instead of the < operator to compare elements.