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

Fix formatting with compile-time API when format string is empty #2042

Merged
merged 1 commit into from Dec 2, 2020

Conversation

alexezeder
Copy link
Contributor

Right now {fmt} cannot be used with empty string format with compile-time API, while it can be used with regular API:

fmt::format(""); // ok
fmt::format(FMT_COMPILE("")); // compilation error

Proof on Compiler Explorer

With this tiny fix, compile-time API also get this useless feature.
Also, a test for FMT_COMPILE with an empty string added.

@vitaut vitaut merged commit 683a745 into fmtlib:master Dec 2, 2020
@vitaut
Copy link
Contributor

vitaut commented Dec 2, 2020

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.

None yet

2 participants