This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/a/2553109/227159 | |
/** | |
* In its constructor temp_value stores a reference to a variable and a copy of the | |
* variable's original value. In its destructor it restores the referenced variable | |
* to its original value. So, no matter what you did to the variable between | |
* construction and destruction, it will be reset when the temp_value object goes out | |
* of scope. | |
*/ |
NewerOlder