C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Execute statement when leaving scope

From: Pavel Vazharov <freakpv_at_[hidden]>
Date: Mon, 12 Dec 2022 11:42:44 +0200
> I propose that we should be able to achieve this in C++26 with some
> simple syntax as follows:
>

There is similar functionality already proposed by wg21.link/P0052.
https://en.cppreference.com/w/cpp/experimental/scope_exit
However, I don't see the above implemented in the libstdc++ for GCC 12.1.

Received on 2022-12-12 09:42:57