local_stream_flags(stream_type& stream) : pstream(&stream), saved_flags(stream.flags()) {}
~local_stream_flags() { pstream->flags(saved_flags); }
template<class C, class T> BasicIosFormatResetter<C,T>:: BasicIosFormatResetter(stream_type &s): stream(s), orig_flags(s.flags()), orig_fill(s.fill()), orig_prec(s.precision()) {}