Hello , lets say I want to overload a SET so when I use set.count() or set.find() it follows some rules, for example given a set of pairs:
{1,2} {3,4} {1,4} ...
If it says pair A and B are equivalent if A.y < B.x or A.x > B.y , how could I overload such a function? since I tried using "==" and "<" with no success :(
Auto comment: topic has been updated by ArepitaDePernil (previous revision, new revision, compare).
Just like any other user-defined function, but you should use the
operator
keyword as shown in the following example.