
9 Apr
2007
9 Apr
'07
6:46 a.m.
Andrey Semashev wrote:
Another good use case for scope guards is making rollbackable code. But I see, this implementation doesn't support that.
bool rollback = true; // ... BOOST_SCOPE_EXIT( (rollback) ) { if(rollback) do_rollback(); } BOOST_SCOPE_EXIT_END // ... rollback = false; // commit -- Alexander Nasonov http://nasonov.blogspot.com What would men be without women? Scarce, sir, mighty scarce. -- Mark Twain -- This quote is generated by: /usr/pkg/bin/curl -L http://tinyurl.com/veusy \ | sed -e 's/^document\.write(.//' -e 's/.);$/ --/' \ -e 's/<[^>]*>//g' -e 's/^More quotes from //' \ | fmt | tee ~/.signature-quote