Re:In the C++ bag of tricks: scoped locks
by khc on Friday February 07, 2014 @12:47PM
(#7197575)
if you can rely on gcc, cleanup attribute is probably the best you can do. The solution in original post doesn't cope with "break", "continue", "return" (and of course, "goto", but I don't remember if cleanup attribute handles that either).
Looks like their project already uses C++ though, so why don't they just use C++ for this is beyond me.
Looks like their project already uses C++ though, so why don't they just use C++ for this is beyond me.