Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
rezonant
· 11mo ago · 0 comments
Why would that be preferable to just using an RAII style scope_exit with a lambda
Comments
[–]
troglo-byte
11mo ago
Meh, I was going to use the preprocessor for __LINE__ anyways (to avoid requiring a variable name) so I just made it an "old school lambda." Besides, scope_exit is in C++23 which is still opt-in in most cases.