top | item 42616350

(no title)

aleden | 1 year ago

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...

discuss

order

bdamm|1 year ago

Only for those willing to stomach the entire boost hairball, which in embedded environments might be too much to ask.

aleden|1 year ago

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.