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

Cannot dispatch to fmt::formatter for vector types #4243

Open
nextsilicon-itay-bookstein opened this issue Nov 21, 2024 · 1 comment
Open

Comments

@nextsilicon-itay-bookstein

See here: https://clang.godbolt.org/z/b8qrPP153
Debugging this myself I think the issue is with the predicate fmt::detail::use_formatter, where vector types are neither classes, nor enums, nor unions, nor arrays.

@vitaut
Copy link
Contributor

vitaut commented Nov 22, 2024

You cannot define a formatter for what is essentially a built-in type (this is similar to e.g. _BitInt(N) case). You could wrap your type in a class/struct and provide a formatter for that.

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