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

Missing named argument substitued by positional argument #1796

Closed
thpoll83 opened this issue Jul 30, 2020 · 1 comment
Closed

Missing named argument substitued by positional argument #1796

thpoll83 opened this issue Jul 30, 2020 · 1 comment

Comments

@thpoll83
Copy link

I tested this with 7.0.1 (but couldn't see a fitting fix in 7.0.2):

The following line will produce the string "1.0-1.000000", but there is no named argument specified:
auto expr = fmt::format("{namedArg}-{:f}", 1.0);

I expected an exception.

It correctly fails to compile when using fmt::format(FMT_STRING("{namedArg}-{:f}", 1.0));

@vitaut
Copy link
Contributor

vitaut commented Jul 30, 2020

Fixed in 21c8b5c. Thanks for reporting!

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