Skip to content

Implement P0448R4 spanstream - #2029

Merged
Stephan T. Lavavej (StephanTLavavej) merged 35 commits into
microsoft:mainfrom
miscco:spanstream
Sep 11, 2021
Merged

Implement P0448R4 spanstream#2029
Stephan T. Lavavej (StephanTLavavej) merged 35 commits into
microsoft:mainfrom
miscco:spanstream

Conversation

@miscco

Copy link
Copy Markdown
Contributor

This implements spanstream that was recently voted into C++23

Fixes #1970

@miscco Michael Schellenberger Costa (miscco) changed the title Implement spanstream Implement P0448R4 spanstream Jun 30, 2021
Comment thread stl/inc/iosfwd
Comment thread stl/inc/spanstream Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Comment thread stl/inc/spanstream
Comment thread stl/inc/spanstream Outdated
Co-authored-by: Matt Stephanson <68978048+MattStephanson@users.noreply.github.com>
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Co-authored-by: Adam Bucior <35536269+AdamBucior@users.noreply.github.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Partial review (to be available as a video recording in the near future), I looked at everything except stl/inc/spanstream and P0448R4_spanstream/test.cpp.

Comment thread stl/CMakeLists.txt
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/spanstream
Comment thread tests/std/tests/P1502R1_standard_library_header_units/test.cpp
Comment thread tests/std/tests/P0448R4_iosfwd/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_iosfwd/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_iosfwd/test.cpp
Comment thread tests/std/tests/P0448R4_iosfwd/test.cpp Outdated
Comment thread stl/inc/spanstream Outdated
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
@StephanTLavavej

This comment has been minimized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Video reviewed basic_spanbuf and the recent commits; basic_ispanstream and below, and the new test, remain. (This is a lot of code, thanks for working on it! 😻)

Comment thread tests/std/tests/P1502R1_standard_library_header_units/test.cpp
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Also, this test can assume that concepts are available.
@StephanTLavavej

This comment has been minimized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I'll validate and push changes.

Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream
Comment thread stl/inc/spanstream Outdated
Comment thread stl/inc/spanstream Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
@StephanTLavavej

This comment has been minimized.

@miscco

This comment has been minimized.

Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp Outdated
Comment thread tests/std/tests/P0448R4_spanstream/test.cpp
Co-authored-by: Charlie Barto <chbarto@microsoft.com>
@StephanTLavavej

Copy link
Copy Markdown
Member

Michael Schellenberger Costa (@miscco) I pushed changes to use variable templates in the test as Charlie Barto (@barcharcraz) suggested. It's slightly fewer lines of source code, and avoids emitting function calls (which isn't a big deal in test code, but can make stepping through a bit nicer). I also took this opportunity to rename get_input_array to input_ptr because "1 2 3 4 5" (in both the old and new code) decays from an array to a pointer.

@StephanTLavavej

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 5d6a1f2 into microsoft:main Sep 11, 2021
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for continuing to implement a stream of span features! 😹 🚀 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx23 C++23 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P0448R4 <spanstream>

6 participants