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

Dynamic precision for nested_formatter does not work #3860

Open
tobiasleibner opened this issue Feb 20, 2024 · 1 comment
Open

Dynamic precision for nested_formatter does not work #3860

tobiasleibner opened this issue Feb 20, 2024 · 1 comment

Comments

@tobiasleibner
Copy link

When changing the struct Point example explaining nested_formatter-usage in the API reference to use dynamic precision, execution fails with an error

Execution build compiler returned: 0
Program returned: 139
terminate called after throwing an instance of 'fmt::v10::format_error'
  what():  precision is not integer
Program terminated with signal: SIGSEGV

Reproducer on godbolt: https://godbolt.org/z/srYqdvnEb

@tobiasleibner tobiasleibner changed the title Dynamic precision for nested_formatter Dynamic precision for nested_formatter does not work Feb 20, 2024
@vitaut
Copy link
Contributor

vitaut commented Mar 19, 2024

Thanks for reporting. The problem is that the wrong format context is being used in the nested format call. We'll need to tweak the API a bit to synchronize contexts.

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