Archived issue #0031862
[REGRESSION] Coding - Flags of output stream are modified
Description
Since the revision V7_5_0_beta the output of my program has changed. When printing floats to std::cout, more digits than before are displayed. After digging into the OCCT code, I found out that the flag modifications happen in AppDef_Variational::Dump.
This can be prevented by storing the stream flags and restoring them later.
This can be prevented by storing the stream flags and restoring them later.
Public activity
6 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Benjamin Bihler
Date: Mon Oct 19 11:09:13 2020 +0200
0031862: [REGRESSION] Coding - Flags of output stream are modified
Added RAII class to restore stream flags after dump.
[revision removed]
Detailed log of new commits:
Author: Benjamin Bihler
Date: Mon Oct 19 11:09:13 2020 +0200
0031862: [REGRESSION] Coding - Flags of output stream are modified
Added RAII class to restore stream flags after dump.
Here
https://stackoverflow.com/questions/2273330/restore-the-state-of-stdcout-after-manipulating-it
are several alternative proposals how to solve that issue, if you are not content with my solution.
https://stackoverflow.com/questions/2273330/restore-the-state-of-stdcout-after-manipulating-it
are several alternative proposals how to solve that issue, if you are not content with my solution.
> I found out that the flag modifications happen in AppDef_Variational::Dump.
I don't think that AppDef_Variational::Dump() could be the cause - no changes to the logic itself have been done recently there (#0030895 targeting OCCT 7.4.0 doesn't seem should change behavior), and I don't think the method is called at all in your context (could you check this with a breakpoint?).
I don't think that AppDef_Variational::Dump() could be the cause - no changes to the logic itself have been done recently there (#0030895 targeting OCCT 7.4.0 doesn't seem should change behavior), and I don't think the method is called at all in your context (could you check this with a breakpoint?).
You are probably right. Right now I even cannot reproduce the problem! :-(((
Sorry for a false issue report. I guess you can close the issue! (If I find the error again and I am sure where it comes from, I can reopen the issue.)
Sorry for a false issue report. I guess you can close the issue! (If I find the error again and I am sure where it comes from, I can reopen the issue.)
Okay, I have found my error. It was definitely a misinterpretation. Please close the issue.
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]
Related records