Fix fstream.seekp(0, ios::cur)#3773
Fix fstream.seekp(0, ios::cur)#3773StephanTLavavej merged 22 commits intomicrosoft:mainfrom achabense:_For_fstream
fstream.seekp(0, ios::cur)#3773Conversation
fstream.seekp(0, ios::cur)fstream.seekp(0, ios::cur)
strega-nil-ms
left a comment
There was a problem hiding this comment.
This seems reasonable to me.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
CaseyCarter
left a comment
There was a problem hiding this comment.
The fix looks fine, but I'd like to see a regression test (a test that fails without the fix but succeeds with it) to validate it.
|
|
|
Please note that we strongly recommend configuring your editor to clang-format on save. (VSCode can do this with Microsoft's C/C++ Extension or xaver's clang-format extension, among others.) The CI system is a shared resource, so it's best to avoid putting unnecessary load on it. |
|
Thanks for fixing this bug and testing the fix! 😻 I validated and pushed minor cleanups to the test. |
There's also a cmake |
CaseyCarter
left a comment
There was a problem hiding this comment.
I'll push a change to run the test in C++14 mode.
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks again for this correctness fix! 🐞 ✅ 💯 |
This reverts commit 518f449.
Fixes #3572. As discovered in the issue, we need
fseekfor side effects even when(off,way)==(0,ios::cur).