Follow-up from "Reset std::hex immediately"
The following discussion from !1555 (merged) should be addressed:
-
@graven started a discussion: (+1 comment)
note that we could be more general, and add an RAII type which saves the 'current' state of the stream, and then restores it when it goes out of scope -- which is of course not a novel idea: see https://www.boost.org/doc/libs/1_84_0/libs/io/doc/html/io.html#io_state_savers_boostioios_state_hpp