Scope of temporaries as function arguments
Ali Çehreli
acehreli at yahoo.com
Fri Jun 28 11:01:23 PDT 2013
On 06/28/2013 10:53 AM, monarch_dodra wrote:
> On Friday, 28 June 2013 at 17:30:58 UTC, Ali Çehreli wrote:
>> 1) C++ does not specify whether the stack gets unwound when the
>> program terminates with an uncaught exception. That's why I caught to
>> ensure that the stack objects would be destroyed.
>
> Doesn't it? The stack needs to be unwound for the exception to even
> "escape". It's merely the globals that may not be destroyed. (AFAIK)
The standard does not specify it. On Linux, abort() gets called causing
a core dump, which may be more useful than executing the destructors.
Ali
More information about the Digitalmars-d-learn
mailing list