Assignment #4: C++ Templates

  1. Implement a function template that takes a vector and a function object representing the less than function as parameters, and sorts the vector. You can use any simple quadratic sort.
  2. Implement a function template that takes a vector as parameter and sorts it, using the normal default for comparisons. You should invoke your two-parameter sort, above.