I got small problem with my study's problem.
template<typename T>
class AlgorytmSortujacy
{
public:
template <typename F>
virtual std::vector<T> sortuj(std::vector<T> w, F porownywacz) const = 0;
};
This code has to be interface for sort algorithms. When I e.x. implement bubble sort, I have to derive from this class and implement the sortuj
funtion.
The problem is that VS2013 does not accept those form of code, I mean template virtual function (C2898 error). Do you know of any solutions?
As you see, sort
function takes container from std::vector
and F porownywacz
- it's and functional object which compares two elements of an array
At the end - I think I can't change this code, I got it from the teacher and I think I have to make it work.