error: no match for ‘operator<’ (operand types are ‘const TASK’ and ‘const TASK’)

This error usually comes once we try to make an OBJECT (of a class/struct) as KEY to align data in a std::container. Because operand used are not change and shall not change the value hence container makes it as const.  So we are supposed to make our overloaded operator function as constant member function like below.

Let's first check the problem with multiple std-containers.

no match for ‘operator<’ problem


no match for ‘operator<’ solution

Your Comments /Suggestions & Questions are always welcome. 

We would like to help you with best of our knowledge.

So feel free to put Questions

No comments:

Post a Comment