explicit StreamStateSaver(std::ios &stream) : stream(stream) , state(nullptr) { // Save the stream's state. state.copyfmt(stream); }
ios_guard(std::ios& x) : guarded(x), old(0) { old.copyfmt(guarded); }