
26 Mar
2007
26 Mar
'07
4:59 a.m.
Howard Hinnant wrote: [...]
In essence, we're asking the C community to standardize the semantics of try/finally (no catch, no throw)
Nope. It's more like http://www.ohse.de/uwe/articles/gcc-attributes.html#var-cleanup or, in pthread/C++ speak, just /* * See http://www.cuj.com/documents/s=8000/cujcexp1812alexandr/ */ #define pthread_cleanup_push(routine, arg) \ { \ scope_guard_impl const & _guard = make_scope_guard(arg, routine); #define pthread_cleanup_pop(execute) \ if (!execute) _guard.dismiss(); \ } regards, alexander.