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

Examples for UDT formatters in the documentation won't work with compiled format strings #3487

Closed
erinacio opened this issue Jun 13, 2023 · 1 comment

Comments

@erinacio
Copy link

The examples in API Reference :: Formatting User-Defined Types use format_context for the second parameter of format method. This won't work with FMT_COMPILE(...) or ..._cf as the format context type with compiled format string would be a different one. This is neither documented in API Reference :: Formatting User-Defined Types nor in API Reference :: Format String Compilation, and the compilation error message is error: call to 'write' is ambiguous which looks confusing to me, taking me half an hour to find the root cause. Would be great if such information is added to the documentation and the examples for udt formatters are updated for supporting compiled format strings.

@vitaut
Copy link
Contributor

vitaut commented Jul 20, 2023

Clarified in 95e1ea5. Thanks for the suggestion.

@vitaut vitaut closed this as completed Jul 20, 2023
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