Pass start and end of a vector to sort function using C++method overload

I want to access using overhead using Node which is an object of the base class the method getInicioVetor and getFimVetor inside the child class, I would like to know if there is a way to do this? I tried that, but it didn't work out.

static bool ordenar(const TRegistro &f1, const TRegistro &f2){
   return f1.valor < f2.valor;
}

TRegistro getInicioVetor(){
    it = x.begin();
    return *it;
}

TRegistro getFimVetor(){
    it = x.end();
    return *it;
}


sort(no->getInicioVetor(), no->getFimVetor(), ordenar);
Author: NoobSaibot, 2018-09-26