The consequence of calling f() includes the cost of making a copy of the Invoice object. You suffer this consequence because f() is declared to take its parameter by value. If the Invoice class is ...
I like having some of the protection given by using const for all my GetXXX member functions. I also like to keep my synchronization objects as member variables. And unless I'm missing something, I ...