
On 10/11/05, David Abrahams <dave@boost-consulting.com> wrote:
Boost::lambda has for loops, neh?
Exactly. ( http://boost.org/doc/html/lambda/le_in_details.html#lambda.lambda_expression... for more details ) That being said, would it be a wise design choice to need large amounts of code in a FINALLY block?
Practically speaking, destructors are much better than catch(...) for finally-like operations on many platforms. Several of them have a similar problem to Windows, where catch(...) catches asynchronous exceptions.
I meant using them inside the destructor call to prevent any exceptions from escaping the destructor. And lambda continues to impress--I hadn't realised that lambda already has the try_catch functor magic ( that I mentioned above ) already implemented =) - Scott McMurray