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 '}' in format string" regression in fmt v7 #3086

Closed
oxidase opened this issue Sep 7, 2022 · 2 comments
Closed

"missing '}' in format string" regression in fmt v7 #3086

oxidase opened this issue Sep 7, 2022 · 2 comments

Comments

@oxidase
Copy link

oxidase commented Sep 7, 2022

The following example on 1feb430

#include <fmt/format.h>
#include <iostream>
int main()
{
    std::cout << "FMT_VERSION " << FMT_VERSION << std::endl;
    std::cout << fmt::format("<{:}>", uint8_t{42}) << std::endl;
}

shows

FMT_VERSION 90101
terminate called after throwing an instance of 'fmt::v9::format_error'
  what():  missing '}' in format string

but not a problem with fmt v6

FMT_VERSION 60102
<42>
@vitaut
Copy link
Contributor

vitaut commented Sep 8, 2022

Great catch, thanks! Fixed in ecffca6. As a workaround you can remove : from the format string (it is redundant anyway).

@vitaut vitaut closed this as completed Sep 8, 2022
@oxidase
Copy link
Author

oxidase commented Sep 8, 2022

@vitaut thanks for quick fix!

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