On 5/19/2013 11:37 AM, deadalnix wrote:
On Sunday, 19 May 2013 at 18:27:08 UTC, Walter Bright wrote:oldVar isn't being default constructed in your example, nor can I see why you'd need a default constructor in order to use RAII for save/restore.I need to save the value at construction and restore at destruction. I don't need any runtime parameter at construction.
The saved value is initialized with the value to be saved. This is not default construction.