On 5/25/2017 12:30 AM, Andrei Alexandrescu wrote:
On 5/25/17 6:24 AM, Walter Bright wrote:
On 5/23/2017 3:40 PM, Martin Nowak wrote:
Why does it have to be refcounted? Seems like there is only ever one reference to the current exception (the catch variable).

Rethrowing the catch variable makes for 2 references.

Why doesn't the rethrow count as a move? There is no way it can be reused in the scope that rethrows. -- Andrei

It could be - it's just that there's nothing currently in the compiler to support the notion of moves. So the destructor will still wind up getting called on it.

It's a good idea for a future enhancement, though.

Reply via email to