This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 17/22] Remove make_cleanup_restore_current_uiout
> +class scoped_restore_uiout
> +{
> + public:
> +
> + scoped_restore_uiout () : saved (current_uiout)
> + {
> + }
> +
> + ~scoped_restore_uiout ()
> + {
> + current_uiout = saved;
> + }
> +
> + private:
> +
> + // No need for these. They are intentionally not defined anywhere.
> + scoped_restore_uiout &operator= (const scoped_restore_uiout &);
> + scoped_restore_uiout (const scoped_restore_uiout &);
> +
> + // The saved ui out.
> + struct ui_out *saved;
isn't this just scoped_restore<ui_out *> ? why do you need a separate
class?
Trev