Skip to content

doc extension concerning format_as and general implementations - #4857

Open
rimathia wants to merge 3 commits into
fmtlib:mainfrom
rimathia:doc-extension-user-defined-types
Open

doc extension concerning format_as and general implementations#4857
rimathia wants to merge 3 commits into
fmtlib:mainfrom
rimathia:doc-extension-user-defined-types

Conversation

@rimathia

Copy link
Copy Markdown
Contributor

add a sentence about the possible interaction of format_as and general implementations

@rimathia
rimathia requested a review from vitaut as a code owner July 17, 2026 18:47
@rimathia

Copy link
Copy Markdown
Contributor Author

Follow up on #4852.
My point here is only to have a hint somewhere close to format_as about the possible interaction with general implementations. I'm not very confident I've found the best wording, I trust that you will adjust as you see fit.

@vitaut vitaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like this would be more precise:

format_as cannot be used when a type also matches another formatter specialization, such as the range formatter, because the specializations would be ambiguous. Disable the conflicting specialization, if possible, or provide an explicit formatter specialization instead.

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

Successfully merging this pull request may close these issues.

2 participants