Andre Poenitz wrote:
I am not sure the message is valid. Sure, the compiler sees a tmporary
and returning a reference to a part of something refered to by the
temporary. However, that thing is not a temporary but lives in a
structure  outside. The compiler does not know, but we do. So my
guess is the code is safe and the warning is bogus.

You are probably right. It is trivial to ignore the warning. Just add it to the list of warnings that are disabled in the config.h for MSVC.


Regards,
Asger




Reply via email to