News for hackers. Stuff that matters.
Re:C: Simple Defer, Ready to Use by aleden on Monday January 06, 2025 @04:50PM (#42616350)
Nobody knows about BOOST_SCOPE_DEFER?

#include <boost/scope/defer.hpp>

BOOST_SCOPE_DEFER [&] {

    close(fd);                                                                    
};

Implementation here: https://github.com/boostorg/scope/blob/develop/include/boost...

Re:C: Simple Defer, Ready to Use by bdamm on Monday January 06, 2025 @05:51PM (#42616987)
Only for those willing to stomach the entire boost hairball, which in embedded environments might be too much to ask.
Re:C: Simple Defer, Ready to Use by aleden on Monday January 06, 2025 @08:24PM (#42618187)
Is that why I got down voted? This thing is header-only, I'm guessing it doesn't need rtti or have a big footprint.