From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-02-05 08:26:29
on 2/4/00 1:13 PM, Darin Adler at darin_at_[hidden] wrote:
> I think auto_restore is a good name.
> For what it's worth, the most-used Macintosh application framework,
> Metrowerks' PowerPlant, has the same class as the proposed one. It changes
> the value and as in our latest proposed version, it takes a reference as the
> first constructor parameter and a const reference as the second. Its name is
> "PowerPlant::StValueChanger". The St prefix is pretty silly; it is used to
> indicate "I expect this will be used for the type of an automatic variable".
auto_restore is no good if you're not restoring the value to its original.
What's wrong with set_on_exit, I wonder? Just that it doesn't use "auto_" in
its name? It is perfectly descriptive, I think.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk