C++ Logo


Advanced search

Re: [std-proposals] finally keyword

From: Andrey Semashev <andrey.semashev_at_[hidden]>
Date: Sun, 1 May 2022 12:06:41 +0300
On 5/1/22 11:04, Peter C++ via Std-Proposals wrote:
> available in standard library extensions TS2, as scope guards, but not
> approved to std for the better.(I am the author)

Could you share the rationale why scope guards were not approved?

I'm using Boost.ScopeExit rather often as writing a class for every
instance where I need some code to be executed on leaving the scope is
just unreasonable. Yes, I'm using RAII and that is not the solution (I'm
not talking about code that releases resources). I think a scope guard
tool is sorely missing in the standard library. Not so sure about the
core language extension though.

Received on 2022-05-01 09:06:45