3 ms·
> Can safely implement scope guards Can you elaborate on this?
by alexeiz 4y ago
> Can safely implement scope guards
Can you elaborate on this?
- einpoklum 4y agoA count of the number of exceptions in-flight was added, replacing the boolean indication of whether an exception is in-flight. This allows the scope guard construct proposed by Andrei Alexandrescu to distinguish between a scope being left on success and on an exception being thrown. YouTube video about scope guard: https://www.youtube.com/watch?v=WjTrfoiB0MQ https://www.youtube.com/watch?v=WjTrfoiB0MQ Description of the change to the standard: https://isocpp.org/files/papers/N4152.pdf https://isocpp.org/files/papers/N4152.pdf