Re: Throwing a reference to a temporary object
Thanks for the fast answer.
I was looking more for a theoretical guarantee from the language
specification about the copying of thrown objects.
Maybe compiler implementation details can affect this: optimization
could remove that copy or if the exception has to propagate through
more than one function call it could be copied more than once.
|