On 8/25/2018 4:49 PM, Nicholas Wilson wrote:
Run semantic3 on the constructor independent of the requirement to destruct already constructed objects. If the constructors is nothrow then there is no need to have the destructors run or the eh code at all, because no Exceptions can be thrown (an Error may be thrown but that will kill the program). This is how I intend to fix it after I refactor semantic3.

A function can be made nothrow by:

    try {
       ....
    } catch (Exception e) {
       ... handle it locally ...
    }

Also, your proposal is ignoring the destructors, which is literally what the compiler does now.

Reply via email to