So, just add them the way you do.
Code:
template<typename T>
void Custom_container::add_sort(bool (*ls)(T,T))
{
sort_routines.push_back(ls);
activeSort = ls;
}
...
the_list.sort(*sort_routines[i]);
Or maybe you want to sort a list with the selected routine, something like:
Code:
template<typename T>
void Custom_container::select_sort(int index)
{
//some checks
activeSort = sort_routines[index];
}
...
myContainer.mySort(...);
which can call sort with activeSort as a parameter for the given list you want. Except if I am missing something...