You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a custom type defines both operator bool and operator<<, it is formatted as bool instead of using the custom operator<<.
According to git bisect, behavior changed with ccc8f5d to fix #1316.
This seems to be the same issue as #247. (I don't know if the expected behavior changed since then.)
I don't see a way to make this work without breaking a much more important fix of #1316. Since having an implicit conversion to bool is a bad idea in general, I recommend making it explicit. Alternatively you can provide a custom formatter<S>: https://fmt.dev/latest/api.html#formatting-user-defined-types
If a custom type defines both
operator bool
andoperator<<
, it is formatted asbool
instead of using the customoperator<<
.According to
git bisect
, behavior changed with ccc8f5d to fix #1316.This seems to be the same issue as #247. (I don't know if the expected behavior changed since then.)
Example code (Godbolt):
Prints
s: true
instead ofs: s-value
.The text was updated successfully, but these errors were encountered: