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

Add support for std::format. #535

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Add support for std::format. #535

wants to merge 1 commit into from

Conversation

jzmaddock
Copy link
Collaborator

This is a tentative first step towards supporting C++20's std::format.

Integers are all working and feature complete other than the usual undiscovered bugs and corner cases.

Other number types will require some refactoring of the code in format.hpp, though exactly how/what remains to be seen.

This also ties in with #297 as it adds binary string formatting.

Currently only latest msvc supports <format>, for gcc we will have to wait for gcc-13 later in the year, likewise clang/libc++.

Comments welcome as always.

@DouisLavid
Copy link

Hello,
Thanks for the awesome work in Boost.Math :)
I was wondering if there was any plan to merge this PR in the foreseeable future, as it is a feature that would be quite useful for me. If not, would you say that there is any reason that would make me not want to use your changes locally ? (I'm ok with the "usual undiscovered bugs and corner cases" as nothing display related is critical in my use case, and i'm ok with breaking changes when the feature gets officially supported in the future)

@jzmaddock
Copy link
Collaborator Author

Please do go ahead and use this and report back: we need to revisit this now that latest GCC supports std::format and finish this support off.

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