Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: Replace use of ostream IO manipulators #266

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

bnbajwa
Copy link
Contributor

@bnbajwa bnbajwa commented Feb 5, 2025

Currently, our streaming overloads (operator<<) make use of io manipulators. This means any ostreams making use of such overloads are also required to implement IO manipulators -- this adds non-trivial complexity and state. Not only that, they are cumbersome to use, and typically require saving existing state and restoring it with an RAII object -- this is often forgotten, as is the case in our codebase.

The replacment is built on top of C++20's std::format.

SDB-8506

@bnbajwa bnbajwa requested a review from a team as a code owner February 5, 2025 10:32
toolbox/hdr/Utility.hpp Outdated Show resolved Hide resolved
@bnbajwa bnbajwa force-pushed the comm5 branch 3 times, most recently from c33da15 to 270a65e Compare February 6, 2025 14:00
Currently, our streaming overloads (operator<<) make use of io
manipulators. This means any ostreams making use of such overloads
are also required to implement IO manipulators -- this adds non-trivial
complexity and state. Not only that, they are cumbersome to use, and
typically require saving existing state and restoring it with an RAII
object -- this is often forgotten, as is the case in our codebase.

The replacment is built on top of C++20's std::format.

SDB-8506
@bnbajwa bnbajwa merged commit 007e84f into reactivemarkets:master Feb 12, 2025
5 checks passed
@bnbajwa bnbajwa deleted the comm5 branch February 12, 2025 21:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants