22 Nov
2011
22 Nov
'11
9:34 p.m.
Le 22/11/11 21:12, Bruno Martínez a écrit :
Hi,
How can I call BOOST_SCOPE_EXIT when no variable needs to be captured?
BOOST_SCOPE_EXIT () { CoUninitialize(); } BOOST_SCOPE_EXIT_END;
doesn't work. I tried
BOOST_SCOPE_EXIT (BOOST_PP_NIL) BOOST_SCOPE_EXIT (BOOST_PP_EMPTY) BOOST_SCOPE_EXIT (BOOST_PP_SEQ_NIL)
but they don't work either.
Hi, I think that Boost.ScopedExit needs at least to capture a variable. Boost.Local (which is currently reviewed) provides a similar feature that allows to pass void to mean no capture. I guess this feature will be integrated in ScopedExit soon :), but in order to don't forget, maybe you could create a feature request on the Trac system. Best, Vicente