
16 Mar
2012
16 Mar
'12
2:42 a.m.
lcaminiti wrote:
1) I'd propose to never implement BOOST_SCOPE_EXIT using lambdas. There is no advantage for the user in the lambda implementation because I already extended BOOST_SCOPE_EXIT to use variadic macros, capture the object `this_`, and capture no variable (using `void`) all of which without using C++11 and maintaining backward compatibility with the existing BOOST_SCOPE_EXIT syntax.
If we assume that the new standard is immutable, then you reasoning makes perfect sense. However, what if it was an oversight by the standard committee? 'this' is not a local variable, after all. If they allowed a special case for this, they could also allow data members. Alex