What about if cSalary's operator() creates a temporary object? That temporary object could throw. That's technically two throws.
But of course you could extend this reasoning forever. I guess you have to consider their Assumption b).
Anyway, calling e.Salary() results in one additional execution path from the standpoint of the function and it can be either:
- a member function that simply throws
OR
- a member function that creates a temporary whose construction could throw
OR
- an overloaded operator() on a member variable that throws
Fun little exercise though.
Regards,
Jeff
CodeDread