Daily bit(e) of C++

Share this post

Daily bit(e) of C++ | std::iostream: custom manipulators

simontoth.substack.com

Daily bit(e) of C++ | std::iostream: custom manipulators

Daily bit(e) of C++ #255, Implementing custom manipulators to adjust formatting/parsing of user defined types.

Šimon Tóth
Sep 13, 2023
1
Share this post

Daily bit(e) of C++ | std::iostream: custom manipulators

simontoth.substack.com
Share

When implementing stream insertion and extraction, it might be convenient to expose additional options that allow the class users to control how it is formatted or parsed.

Each stream instance comes with an array of options (integers and pointers) that user-defined manipulators can use to store formatting information.

Click to open in Compiler Explorer.

Leave a comment

Thanks for reading Daily bit(e) of C++! Subscribe for free to receive new posts and support my work.

1
Share this post

Daily bit(e) of C++ | std::iostream: custom manipulators

simontoth.substack.com
Share
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Šimon Tóth
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing