
14 Sep
2012
14 Sep
'12
3:58 p.m.
On 14/09/2012 11:43 AM, Lorenzo Caminiti wrote:
UNARY_SCOPE_EXIT(CloseHandle, handle);
That way the code for this one specialized use case of Scope Exit becomes closer to what your expressed preference is. You can of course put this macro #definition into your own little lib scope_exit_arity.hpp and re-use it across your different projects:)
This was pretty clever and I exclaimed "mother of god" but honestly I need the scope guard's "dismiss/release" function as does 99.93% of people who want the scope guard (I just did a poll.) SO_CLOSE. Sohail