Boost logo

Boost :

From: Brian Ravnsgaard Riis (brian_at_[hidden])
Date: 2005-09-21 14:09:49


Andrey Semashev wrote:
>
> Brian Ravnsgaard Riis wrote:
>
>>Rob Stewart wrote:
>>
>>>I think Markus is right: summon is the opposite of dismiss for a
>>>guard. The question is whether it reads well when used:
>>>
>>> guard g;
>>> if (something) g.dismiss();
>>> ...
>>> if (whatever) g.summon();
>>
>>"Guard"? Somehow "Summon" doesn't read very well above. I'm sorta
>>partial to guard, but this may cause confusion with both the class
>>name and the namespace name?
>>
>>scope_guard g;
>>if(cond) g.dismiss();
>>...
>>if(cond2) g.guard();
>>
>>Just a thought...
>
>
> I agree the "guard" is better. But the variable type name is scope_guard,
> many scope guard tools are resided in boost::guard namespace, the function
> for creating guards is make_guard. Aren't there too much guards here?

Yes, probably. As I said, just a thought...

-- 
  /Brian Riis

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