<random>: Fixes subtract_with_carry_engine io#2088
Merged
CaseyCarter merged 3 commits intomicrosoft:mainfrom Oct 9, 2021
Merged
<random>: Fixes subtract_with_carry_engine io#2088CaseyCarter merged 3 commits intomicrosoft:mainfrom
<random>: Fixes subtract_with_carry_engine io#2088CaseyCarter merged 3 commits intomicrosoft:mainfrom
Conversation
36 tasks
Member
StephanTLavavej
left a comment
There was a problem hiding this comment.
Thanks - and apologies for the long wait! All of the issues I found were minor, so I'll validate and push changes.
Comment on lines
-831
to
+838
| for (int _Jx = 1; _Jx <= _Kx; ++_Jx) { // unpack into _Kx words | ||
| unsigned int _Word = static_cast<unsigned int>(_Buf._At(_Ix) >> ((_Kx - _Jx) * 32)); | ||
| for (int _Jx = 0; _Jx < _Kx; ++_Jx) { // unpack into _Kx words | ||
| const unsigned int _Word = static_cast<unsigned int>(_Buf._At(_Ix) >> (_Jx * 32)); |
Member
There was a problem hiding this comment.
Note for other reviewers (no change requested): as the runtime behavior here was completely messed up, I am okay with changing the serialized output.
StephanTLavavej
approved these changes
Sep 28, 2021
CaseyCarter
approved these changes
Oct 8, 2021
Contributor
|
I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed. |
Contributor
|
Thank you for the bug fix! |
SiliconA-Z
pushed a commit
to SiliconA-Z/STL
that referenced
this pull request
Nov 4, 2021
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tr1::subtract_with_carry, breaking the state into 32-bit words, but the streaming operators should be consistent now.subtract_with_carry_enginestreaming operators hiddenfriends.tr1classes continue to go through a free function taking an_Swc_base&.subtract_with_carry_enginestreaming operators [tab:rand.req.eng], specifically the handling of the stream's flags and leaving the state unchanged if reading fails.