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

to_string supports types with format_as #3575

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Aug 7, 2023

Fix for issue: #3545

Previous PR: #3555

This was referenced Aug 7, 2023
Comment on lines 4300 to 4302
auto buffer = memory_buffer();
detail::write<char>(appender(buffer), format_as(value));
return {buffer.data(), buffer.size()};
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest changing this to to_string(format_as(value)) which is simpler and more efficient for types that map to integers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@vitaut vitaut merged commit e150ea0 into fmtlib:master Aug 13, 2023
40 checks passed
@vitaut
Copy link
Contributor

vitaut commented Aug 13, 2023

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants