Restore ostream format after setpreicision() call
Ryan Long
ryan.long at oarcorp.com
Mon Aug 2 21:29:56 UTC 2021
Hi,
Does anyone know a better approach to restore the precision value after using setprecision()?
I found something online that recommended
std::streamsize prec = std::ios_base::precision();
std::setprecision(2);
.
.
.
std::setprecision(prec);
This makes sense and would work, but I don't know if Coverity will recognize this as the correct way to restore the stream's format.
Thanks,
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210802/b6b7be4e/attachment.html>
More information about the devel
mailing list