The postfix operators
++
and
--
can be overloaded distinctly from their prefix meanings. Postfix can be distinguished by defining the postfix overloaded function as having a single unused integer argument, as in
class T {
public:
//postfix invoked as t.operator++(0);
clock operator++(int);
clock operator--(int);
};
There will be no implied semantic relationship between the postfix and prefix forms.