Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P0896R4 stream iterator changes #1281

Merged
merged 3 commits into from
Oct 9, 2020
Merged

Conversation

CaseyCarter
Copy link
Member

Nothing exotic here, really, just adding default constructors and (for the output iterators) difference types so the stream iterators properly model the C++20 iterator concepts.

I did strengthen some noexcept on my way through, and fixed what appears to be a longstanding bug: ostream_iterator's data members should be private instead of protected.

Partially addresses #39.

Affects `istream_iterator`, `ostream_iterator`, `istreambuf_iterator`, and `ostreambuf_iterator`.
@CaseyCarter CaseyCarter added cxx20 C++20 feature ranges C++20/23 ranges labels Sep 9, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner September 9, 2020 06:52
@CaseyCarter CaseyCarter mentioned this pull request Sep 9, 2020
@StephanTLavavej

This comment has been minimized.

@CaseyCarter

This comment has been minimized.

@CaseyCarter CaseyCarter removed their assignment Sep 10, 2020
@StephanTLavavej StephanTLavavej self-assigned this Sep 16, 2020
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Approved with a handful of nitpicks and one significant question about noexcept strengthening. Thanks!

stl/inc/iterator Show resolved Hide resolved
stl/inc/iterator Show resolved Hide resolved
stl/inc/iterator Show resolved Hide resolved
stl/inc/iterator Show resolved Hide resolved
tests/std/tests/P0896R4_stream_iterators/test.cpp Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej removed their assignment Sep 17, 2020
Copy link
Contributor

@mnatsuhara mnatsuhara left a comment

Choose a reason for hiding this comment

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

Just one question on test coverage, otherwise looks great! :)

@mnatsuhara mnatsuhara removed their assignment Oct 5, 2020
@CaseyCarter CaseyCarter self-assigned this Oct 8, 2020
@CaseyCarter CaseyCarter merged commit 4af65e3 into microsoft:master Oct 9, 2020
@CaseyCarter CaseyCarter deleted the stream branch October 9, 2020 00:56
@CaseyCarter
Copy link
Member Author

We love iterator changes because we're not iter-haters! ❤️

@CaseyCarter CaseyCarter removed their assignment Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx20 C++20 feature ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants