
18 May
2008
18 May
'08
9:42 p.m.
Hi! Noah Roberts schrieb:
Actually, I think you are correct on that. A temporary will only survive into the function call if you are accepting a const& afaik. If you are accepting a const reference then whatever is passed in will be bound to that object and is guaranteed to survive. Otherwise no.
All of my knowledge tells me: you are *not* in trouble here. But at least 10 years ago it was unclear, as this article from comp.std.c++ shows: http://groups.google.com/group/comp.std.c++/msg/3fbd47d85ab1e47d Regards, Frank