Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-02-01 01:50:08

> > I want to save state once at the beggining of something and restore it
> > multiple times after some steps that may pollute io state.
> Nope, the classes are pure-RAII. The classes either save or do an
> save-and-change in the constructor and restore in the destructor. There
> no member functions you could even use for arbitrarily-timed restoring.
> you could abuse the RAII paradigm to do this, then....

Could I make an object during startup and then force restore by making copy
and destroying one immediately?

> BTW, why would you need to do this unusual kind of multiple restoring in
> first place?

I want to save state of cout (or any other current log/report stream for
that matter) at the start of test case/framework run and restore it after
each assertion?


Boost list run by bdawes at, gregod at, cpdaniel at, john at