The postfix operators take an int
parameter. There is already a question as to why, and it seems like the answer is: "Because Bjarne Stroustrup said so"
I'm uncomfortable with that answer. If Bjarne Stroustrup needed something to tip the compiler off to behave differently, why couldn't he just key off whether the operator returned a reference? It leaves me questioning:
- Why can't I do:
foo++ 13;
- Why isn't the
int
parameter defaulted to 1 - Why is this considered a unary operator at all, it takes an argument