$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jason Stewart (jstewart_at_[hidden])
Date: 2005-09-22 15:08:56
>You're missing the usage of wanting to keep the original undo
>behavior, ignore it in some portion of the code, and then
>reinstate it later. With the above, it appears that would entail
>this sort of usage:
>
> scope_guard g(my_undo_function);
> ...
> g = scope_guard();
> ...
> g = scope_guard(my_undo_function);
> ...
>
>That introduces a maintenance problem. With the names we're
>discussing, you'd write this instead:
>
> scope_guard g(my_undo_function);
> ...
> g.dismiss(); // or whatever name is selected
> ...
> g.protect(); // or whatever name is selected
> ...
Ok, I can see that. I like the latest suggestion of dismiss/protect.
abandon might be another possiblity for dismiss and seems to go with protect.
Jason Stewart