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

10.0.0: basic_format_parse_context lost on_error API #3538

Closed
Dani-Hub opened this issue Jul 18, 2023 · 1 comment
Closed

10.0.0: basic_format_parse_context lost on_error API #3538

Dani-Hub opened this issue Jul 18, 2023 · 1 comment

Comments

@Dani-Hub
Copy link
Contributor

Starting with fmtlib 10, the following code does no longer compile anymore:

https://godbolt.org/z/W8oT9WG1q

This code is the verbatim example from

https://fmt.dev/10.0.0/api.html#formatting-user-defined-types

which uses the on_error member function from basic_format_parse_context to handle errors. Similar code which is part of our company's code base broke due to that change.

Initially I assumed this change was intentional (and that the documented API example should be adjusted), but since the previous on_error delegated to internal API (Such as throw_format_error) it is unclear how use code should correctly handle the error without referring to internal API.

@vitaut
Copy link
Contributor

vitaut commented Jul 18, 2023

Duplicate of #3458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants