Boost logo

Boost :

Subject: Re: [boost] Proposed new RAII Library
From: Sohail Somani (sohail_at_[hidden])
Date: 2012-09-14 11:58:29


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk