J
Jess
Hello,
If a function's signature is:
T f();
and it returns its result (of type T) by value, then the result will
be copied into a temporary place, as a temporary object. If it is a
temporary object, then can I still call T's function "g" like the
following?
(f()).g()
I'm wondering how long a temporary object can live, so that I can
modify its states via "g", or do some even more complicated operations
on this temporary object.
Thanks,
Jess
If a function's signature is:
T f();
and it returns its result (of type T) by value, then the result will
be copied into a temporary place, as a temporary object. If it is a
temporary object, then can I still call T's function "g" like the
following?
(f()).g()
I'm wondering how long a temporary object can live, so that I can
modify its states via "g", or do some even more complicated operations
on this temporary object.
Thanks,
Jess