Skip to content

Implement LWG-3571 and LWG-3570: flush_emit set badbit if the emit call fails#2418

Merged
StephanTLavavej merged 18 commits intomicrosoft:mainfrom
fsb4000:fix2396
Mar 17, 2022
Merged

Implement LWG-3571 and LWG-3570: flush_emit set badbit if the emit call fails#2418
StephanTLavavej merged 18 commits intomicrosoft:mainfrom
fsb4000:fix2396

Conversation

@fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Dec 14, 2021

Fixes #2396

Fixes #2395

@fsb4000 fsb4000 requested a review from a team as a code owner December 14, 2021 14:26
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Dec 15, 2021
@fsb4000 fsb4000 changed the title Implement LWG-3571: flush_emit set badbit if the emit call fails Implement LWG-3571 and LWG-3570: flush_emit set badbit if the emit call fails Dec 15, 2021
@fsb4000

This comment has been minimized.

fsb4000 and others added 4 commits December 16, 2021 09:39
Co-authored-by: Matt Stephanson <stephanson.matt@gmail.com>
Co-authored-by: Matt Stephanson <stephanson.matt@gmail.com>
Copy link
Contributor

@MattStephanson MattStephanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@StephanTLavavej StephanTLavavej self-assigned this Jan 19, 2022
@StephanTLavavej
Copy link
Member

Thanks, this looks solid! The only things I noticed were stylistic nitpicks, so I went ahead and pushed a merge with main followed by those trivial changes, after validating that the relevant tests still pass.

if (!_Ok) {
_State |= ios_base::badbit;
} else {
_TRY_IO_BEGIN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God I really don't like these, it's pre-existing (and changing it would be ... a project) so don't consider this a change request, but maybe we should open an issue.

fsb4000 and others added 2 commits March 10, 2022 17:12
Co-authored-by: Charlie Barto <chbarto@microsoft.com>
@StephanTLavavej StephanTLavavej self-assigned this Mar 11, 2022
@StephanTLavavej StephanTLavavej removed their assignment Mar 11, 2022
@StephanTLavavej
Copy link
Member

Thanks - I approve of the ternary-to-if change that @barcharcraz requested, as if this test ever fails, the asserting line will indicate what was expected - same as the rationale for preferring assert(is_cute()); assert(is_fluffy()); assert(is_kitten()); on separate lines instead of assert(is_cute() && is_fluffy() && is_kitten());.

@barcharcraz barcharcraz removed their assignment Mar 12, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej self-assigned this Mar 15, 2022
@StephanTLavavej StephanTLavavej merged commit e6fa258 into microsoft:main Mar 17, 2022
@StephanTLavavej
Copy link
Member

Thanks for syncing the implementation with the Standard's stream of LWG issues! 😹 🚀 🎉

@fsb4000 fsb4000 deleted the fix2396 branch March 17, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LWG-3571 flush_emit should set badbit if the emit call fails LWG-3570 basic_osyncstream::emit should be an unformatted output function

5 participants