Hello. If I overload comparison operators inside a class, it there any way to make the left hand argument const? say, I could make "a" const in the following code outside "somecls"
1 2 3 4
booloperator< (const somecls& a, const somecls& b)
{
return a.value < b.value;
}
but if I define the operator inside the cls
1 2 3 4
bool somecls::operator< (const somecls& b)
{
return value < b.value;
}
in this case, the calling class itself does not seem to be const. Is there a way to do that?