Archived issue #0031862

[REGRESSION] Coding - Flags of output stream are modified

CommunityOCCT:Codingclosed6 public notes

Search issues

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.

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Commenter 2
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.
02Author
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.

03Commenter 3
> 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?).

04Author
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.)
05Author
Okay, I have found my error. It was definitely a misinterpretation. Please close the issue.
06Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]

Related records