February 2005
Beginner to intermediate
272 pages
4h 53m
English
Sometimes it looks like a member operator function overloads a non-member operator, but this is not the case. It’s not overloading; it’s just a different lookup algorithm. Consider the following class that overloads an operator as a member function:

We can call an overloaded operator function with either infix or function call syntax:

When we use the function call syntax, the usual lookup rules apply (see Member Function Lookup [24, 87]), and the call b.operator %(c) is treated in the same way as the similar ...
Read now
Unlock full access