I'm trying to override operator < as the following :
inside Node :
bool operator <(const Node* other) {
return *(this->GetData()) < *(other->GetData());
}
inside vehicle :
bool operator <(const Vehicle &other) {
return this->GetKilometersLeft() < other.GetKilometersLeft();
}
invoking the operator :
while (index > 0 && m_heapVector[index] < m_heapVector[parent(index)])
vector definition :
vector<Node<T>*> m_heapVector;
I checked the call and it's not calling the overridden operators.