-
Notifications
You must be signed in to change notification settings - Fork 111
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
Compile issues with libfmt >=8.1.0 #2935
Comments
87 enum classes in opm-common. Wondering how many are used in fmt::format. Guess I'll need to try. |
We have quite a few "enum to string" facilities in opm-common, is this better done with |
I don't really see how we can define an |
I was implicitly assuming the facility was mostly used for logging, when we often have a stream, but that may not be the case? The distinction between doing stream insertion and string conversion is always annoying me... |
I think throw some_exception_type {
"Unsupported option value '" + stringify(enum_value) + '\''
}; and that's more difficult to handle with |
Seems like newer versions are less forgiving when formatting enum classes.
The problem is that enum classes are not anymore cast internally to int (or similar). See comment on issue 391 of fmt, issue /fmtlib/fmt#1841, and commit fd62fba985.
We either need to provide a formatter, cast to int when formatting, or provide operator<< for all enum classes used with format. To me the latter seems most intriguing.
The text was updated successfully, but these errors were encountered: