-
Notifications
You must be signed in to change notification settings - Fork 23
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
Clang 17 compatibility #69
Clang 17 compatibility #69
Conversation
Clang 17 warns about this by default and with -Werror enabled here that breaks the build.
One of those, unknown_category, is shadowed by a local static variable in service::display_name(), which Clang 17 warns about and with -Werror breaks the build.
Thank you! Regarding the |
I don't think those changes are the problem here, it's mainly clashing ostream operator<< overloads it seems, upstream also has an open issues about that (HowardHinnant/date#773). |
I was thinking about how to upgrade to the A similar problem exists with the |
motis-project/date#2 addresses the |
It's definitely a challenge trying to use this excellent library with C++20 when targeting various platforms: Android - doesn't have zones, formatting or writing of durations and time points to streams Obviously the above is specific to the versions of compilers I am using, but generally the most recent official. |
I guess I lack some context. Regrading targets: currently we support MacOS (AppleClang), Windows (MSVC) and Linux (Clang 17 + GCC 13 for amd64 + aarch64) which is also tested via CI both in MOTIS as well as here. More targets (such as Android / iOS) are definitely possible (probably with slight changes here and there) but currently there's no use case so nobody invested the time. |
See individual commits for details, mainly fixing new warnings that break the build due to -Werror being set here.
That however only fixes half of the overall problem,
date
still needs a solution. That is unlikely to get upstream fixes for C++20 compatibility it seems (as it itself has become part of C++20 in slightly modified form), but with that new API appearing in libc++ we end up with a few clashes and/or ambiguities.