[libc-commits] [libc] [libc] Add a simple scope_exit wrapper and use it in socket tests (PR #192615)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Tue Apr 28 01:22:02 PDT 2026
labath wrote:
> Since `scope_exit` seems to be still experimental for C++ would it make more sense to put it in top level `__support` since it's not technically C++ standard yet?
That is what I wanted to ask *you* :)
I can see a case both. I put it here because it made (slightly) more sense to me, but I don't have a feel for the preferences of the project. I have no problem with putting it elsewhere.
> Additionally, `scope_exit` should probably have a comment explaining where it's from.
Will add.
> P.S. Not necessary for this PR but after it lands I'd like to use this for FILE related tests as well.
Yeah, I was planning to follow this up and add more uses. The changes in the PR are here just to demonstrate usefulness.
https://github.com/llvm/llvm-project/pull/192615
More information about the libc-commits
mailing list