What should happen in #cpp if an exception is thrown from a local variable destructor called after executing a return statement?
What if the exception is caught and a new value returned?
GCC/Clang doesn't destruct first return-value in both cases:https://wandbox.org/permlink/EYaWoDGVeYPvWf3H …
-
-
From the C++ WD [except.ctor]: > ... If an exception is thrown during the destruction of temporaries or local variables for a return statement, the destructor for the returned object (if any) is also invoked. ...
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.