RAII guard installing an output_sink for its scope, restoring the previous one on exit. More...
RAII guard installing an output_sink for its scope, restoring the previous one on exit.
Saves whichever output_sink is currently installed on tts::output(), installs s, then restores the saved one once the guard goes out of scope - even through an early return or an exception.
Public Member Functions | |
| scoped_sink (output_sink &s) | |
| Installs s as the current output_sink, saving whichever one was previously installed. | |