ostream state preservation

This commit is contained in:
Michael Davidsaver
2021-02-15 10:32:07 -08:00
parent 4ea98d61f6
commit 1859e44fcf
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -240,6 +240,7 @@ std::ostream& operator<<(std::ostream& strm, const Escaper& esc)
if(c>=' ' && c<='~') { // isprint()
strm.put(c);
} else {
Restore R(strm);
strm<<"\\x"<<std::hex<<std::setw(2)<<std::setfill('0')<<unsigned(c&0xff);
}
continue;