|
Boost : |
From: Joseph Gottman (joegottman_at_[hidden])
Date: 2000-02-06 19:59:54
----- Original Message -----
From: Stephen C. Gilardi <squeegee_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, February 06, 2000 1:13 PM
Subject: [boost] Re: yet another utility class
>
> We are treating this like a temporary push to the top of a "stack" of
> values for the given variable.
>
> How does this sound for readability:
>
> {
> block_push_value push(mDisableUpdates, true);
> block_push_value push2(mEnableLogging, true);
> }
>
> --Steve
>
Both of these suggest to me that we are setting the value of the
variable to true for the CURRENT scope or block, and that the original value
will be restored once the block is exited. This is the exact opposite of
what the class actually does. This is why I prefer set_value_on_exit. It
makes it clear exactly when the variable takes on the value.
Joe Gottman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk