Skip to content

Conversation

@friedkeenan
Copy link
Contributor

Closes #4611.

As discussed in that issue, FMT_STRING(s) has been made to simply expand to s when FMT_USE_CONSTEVAL is enabled.

This fixes the issue with formatting chrono durations.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Please move the check to FMT_STRING because FMT_STRING_IMPL is also used in format string compilation which we shouldn't change.

@friedkeenan
Copy link
Contributor Author

Moved the check. I'm not certain how concerned I should be about the failing tests on the previous commit. Running the tests locally succeed for me, at least

@friedkeenan
Copy link
Contributor Author

I'm not really sure what to make of the failing workflows. The linting stuff really doesn't seem like my fault. The other failing ones though do seem related to FMT_STRING, but I'm not sure what to make of the errors. Could it be that FMT_USE_CONSTEVAL is getting enabled when it shouldn't be? Sorry, I'm not very familiar with the codebase.

@vitaut
Copy link
Contributor

vitaut commented Nov 22, 2025

Most (possibly all) of the issues should be fixed now. Could you rebase?

@friedkeenan
Copy link
Contributor Author

Rebasing seems to have gone okay. I've never actually done it before since I prefer to merge, but should be done now.

@vitaut
Copy link
Contributor

vitaut commented Nov 22, 2025

There is still a lint issue caused by clang-format version mismatch. You can ignore it.

@friedkeenan
Copy link
Contributor Author

Everything else seems to be passing. Good to merge, then?

@vitaut vitaut merged commit 9f197b2 into fmtlib:master Nov 22, 2025
40 of 41 checks passed
@vitaut
Copy link
Contributor

vitaut commented Nov 22, 2025

Merged, 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.

Compilation error when formatting a chrono duration when using fmtlib as a module

2 participants