Because setColor is implemented simply by inserting an int into the stream, the output will be affected by hex or oct or potentially other stream manipulators such as setw. Should the stream manipulator state be stored with ios.copyfmt and loaded after the escapes have been printed?
Because
setColoris implemented simply by inserting anintinto the stream, the output will be affected byhexoroctor potentially other stream manipulators such assetw. Should the stream manipulator state be stored withios.copyfmtand loaded after the escapes have been printed?