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

Feature Request: BasicWriter that writes to stdout #352

Closed
marton78 opened this issue Jul 7, 2016 · 2 comments
Closed

Feature Request: BasicWriter that writes to stdout #352

marton78 opened this issue Jul 7, 2016 · 2 comments

Comments

@marton78
Copy link

marton78 commented Jul 7, 2016

Hi,

it would be great if fmt could fill this omission, it could then be used as a replacement of iostreams.

@vitaut
Copy link
Contributor

vitaut commented Jul 12, 2016

Thanks for the suggestion. The formatting functions such as fmt::print already support output to stdout, but I agree that it would be nice to have similar functionality in the write API. The main issue that has to be solved is buffer management. Since fmt::BasicWriter already uses the output buffer, the FILE's one is probably redundant and file descriptors should be used instead.

@vitaut
Copy link
Contributor

vitaut commented Oct 14, 2017

Since BasicWriter is mainly an optimization, it will likely be superseded by the format API with compile-time handling of format strings (#546). It might still be there for compatibility reasons but there is little reason to extend it to support writing to files, etc.

@vitaut vitaut closed this as completed Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants