4 ms·
It’s been a while since I’ve programmed C++, but both claims seem incorrect. It seems like the author believes there are 3 arguments to `processWidget` when in
by WalterGR 5y ago
It’s been a while since I’ve programmed C++, but both claims seem incorrect. It seems like the author believes there are 3 arguments to `processWidget` when in fact there are only 2.
(That said, evaluation order is certainly something to be aware of.)
Edit: Oh, I see. From the book:
Before processWidget can be called, then, compilers must generate code to do these three things:
• Call priority.
• Execute “new Widget”.
• Call the tr1::shared_ptr constructor.
C++ compilers are granted considerable latitude in determining the order in which these things are to be done