-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<syncstream>: implement basic_syncbuf and basic_osyncstream #1564
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started this review to have all questions that I think need a maintainer's input.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some concerns about fancy pointers and allocators, but besides that mostly nits.
Great progress 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started sorting out the tests for this PR.
I do not really understand why P1502R1_standard_library_header_units
is failing now, so I'd like your input.
tests/std/tests/P0053R7_cpp_synchronized_buffered_ostream/test.cpp
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Re-structure _Basic_sync_global_mutex - Re-organize functions in basic_syncbuf - Update related files when adding a new header
Co-authored-by: Adam Bucior <[email protected]>
Co-Authored-By: Adam Bucior <[email protected]>
Co-Authored-By: Adam Bucior <[email protected]>
- it does not protect against overflow, but for test purposes it should be (fine?) Co-Authored-By: Stephan T. Lavavej <[email protected]>
tests/std/tests/P0053R7_cpp_synchronized_buffered_ostream/test.hpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0053R7_cpp_synchronized_buffered_ostream/test.hpp
Outdated
Show resolved
Hide resolved
Co-Authored-By: Adam Bucior <[email protected]>
Thanks for fixing the fancy pointer and allocator issues! I've pushed two commits, adding Please note: Further changes are still possible (e.g. if you notice something, or if final review leads to more feedback that should be addressed before merging), but they must be replicated to the mirror PR in order to avoid codebase divergence. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment is increasingly confusing - it was added when the BuildFiles below was moved to the top, which is the important part. special_math.cpp doesn't need to be literally first. We aren't going to arbitrarily reorder these lists, and in the long term, our CMake build system will replace our legacy msbuild system.
I've pushed a comment change to an internal |
I've pushed and mirrored a change to use The fix is to use the Lines 9 to 11 in 8f79acf
This guarantees initialization order within the syncstream.cpp translation unit. (I had seen this pattern before, but forgot about it since I've never added occurrences in my 14 years working on the STL - first time for everything.)
I have copied the exact spelling of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of noexcept
questions, looks good otherwise.
Thanks for implementing this new stream! 🎉 🚀 😺 This will ship in VS 2019 16.10 Preview 2. |
This PR will implement P0053R7 and P0753R2. should close #3.
It's still on going work, current progress tracking:
basic_syncbuf
basic_osyncstream
osyncstream
manipulatorsbasic_syncbuf
basic_osyncstream
osyncstream
manipulators