November 1999
Intermediate to advanced
336 pages
6h 29m
English
A temporary object could penalize performance twice in the form of constructor and destructor computations.
Declaring a constructor explicit will prevent the compiler from using it for type conversion behind your back.
A temporary object is often created by the compiler to fix a type mismatch. You can avoid it by function overloading.
Avoid object copy if you can. Pass and return objects by reference.
You can eliminate temporaries by using <op>= operators where <op> may be +, -, *, or /.
Read now
Unlock full access