Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-09-21 17:21:23


Ariel Badichi <abadichi_at_[hidden]> writes:

> Andrey Semashev wrote:
>> - The naming of arm/disarm methods of scope guard. They are used to change
>> the activity status of the guard. Personally, I feel fine with them but the
>> commonly used name for disabling the guard is "dismiss" and I just can't
>> figure out its suitable counterpart in English. I wonder if anyone have a
>> proposal about this.
>
> How about "enable" and "disable"? Although I must admit that I never had
> the need to re-enable a scope guard, and that I favor "dismiss" for
> disabling.

Another thought:

     g = 0;

it's easy to arrange that only a literal zero works there.
I don't love it, but maybe it will get your ideas flowing.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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