A simple way to "tune" on them is thinking on how compute an expression like
z = (a+b)*c;
What does multiply
c
?
"The result of
a+b
", but it has to be stored somehow as result of
+
just for the time neede to
*
to compute.
Now what about
z = operator*(operator+(a,b),c);
This is the same as above: the function named "
operator+
" return a result,
that is then passed to another function -
operator*
, in this case - in the form of a temporary value.
Much like
z = f(g(a,b),c);
expressed as
tmp = g(a,b);
z = f(tmp,c);
Of course, this is not completely exhaustive about temporaries, but is just a way to imagine them in a case they have to come to existence.