src/bh_util.h
@@ -94,9 +94,14 @@ { typedef std::function<void(void)> func_t; func_t m_func; public: explicit ExitCall(func_t f): m_func(f) {} ~ExitCall() { if (m_func) { m_func(); } } explicit ExitCall(func_t f) : m_func(f) {} ~ExitCall() { if (m_func) { m_func(); } } }; // macro helper @@ -106,6 +111,5 @@ #define DEFERF(func) ExitCall JOIN(defer_ , __LINE__)(func) // defer simple expression #define DEFER1(expr) DEFERF([&](){ expr; }) #endif /* end of include guard: BH_UTIL_SOXWOK67 */