-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
C++ API: compilation error with C++20 or newer #1711
Comments
You aren't obligated to use the submodule version of |
After further investigation, the issue is not with I've started a branch with these changes here. It needs some work to ensure that we're actually backwards compatible as far we want to be, and to test this as part of the CI. One somewhat odd behavior I found was that I didn't get any errors compiling with C++20 mode using Apple Clang on macOS, even without these changes. |
just as a note: this problem occurs when trying to compile one of the examples. so C++ Cantera users are currently forced to use C++17 or earlier. |
Compiling the C++ API with C++20 or newer results in errors with calls to the fmt library. E.g. with msvc 143, c++latest:
1>D:\loew\proj\cantera\include\cantera\base\ctexceptions.h(89,32): error C7595: 'fmt::v9::basic_format_string::basic_format_string': call to immediate function is not a constant expression
1>D:\loew\proj\cantera\include\cantera\base\AnyMap.h(749,64): error C7595: 'fmt::v9::basic_format_string<char,const std::string &,const std::string &>::basic_format_string': call to immediate function is not a constant expression
1>D:\loew\proj\cantera\include\cantera\base\ctexceptions.h(89,32): error C7595: 'fmt::v9::basic_format_string<char,const double &>::basic_format_string': call to immediate function is not a constant expression
1>D:\loew\proj\cantera\include\cantera\base\ctexceptions.h(89,32): error C7595: 'fmt::v9::basic_format_string<char,const std::string &,const std::string &,const std::string &>::basic_format_string': call to immediate function is not a constant expression
1>D:\loew\proj\cantera\include\cantera\base\global.h(231,46): error C7595: 'fmt::v9::basic_format_string::basic_format_string': call to immediate function is not a constant expression
The version of the fmt submodule is outdated and should be updated to a recent version.
Try to compile the simple-demo with C++20 or newer on msvc
Behavior
compilation errors
System information
Attachments
Additional context
The text was updated successfully, but these errors were encountered: