Re: [RFA 17/22] Remove make_cleanup_restore_current_uiout

Trevor Saunders
2016-09-29T11:55:57Z

> +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