Boost logo

Boost :

From: Andrey Semashev (andysem_at_[hidden])
Date: 2005-09-21 13:34:31

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?

Boost list run by bdawes at, gregod at, cpdaniel at, john at