-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
compiler error using clang-16.0.5 when using gcc-13.1 standard library #4051
Comments
We use GCC 13.3.0 in the CI. Can you please re-test with the latest develop branch? |
the problem persists, I think it is triggered by clang lacking support for some ranges feature. |
The same setting for Clang 17.0.1 works I think the ranges-detection asks the standard library 'what it supports', but then there is compiler support in clang-16 missing that the standard library from gcc 13.1 relies on. So maybe this this not a bug, but something that can't be reliably queried? |
Sorry, I missed the point about mixing Clang with GCC's STL. We do check Clang with both libc++ and libstdc++, but only for the latest Clang version (20.0.0). I'm not sure to what extend I can test all combinations of Clang/GCC. With #4440 we have a similar issue with ranges. Maybe we need to refine this detection code to incorporate the experiences from the compiler combinations. Apparently, it is insufficient to "trust" #ifndef JSON_HAS_RANGES
// ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error
#if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427
#define JSON_HAS_RANGES 0
#elif defined(__cpp_lib_ranges)
#define JSON_HAS_RANGES 1
#else
#define JSON_HAS_RANGES 0
#endif
#endif |
I did some more testing, it is indeed very specific for some combinations and I did not find a reliable way to detect this. Let's just close this as 'won't fix' |
Description
https://godbolt.org/z/jnxMe6veT
workaround: -DJSON_HAS_RANGES=0
Reproduction steps
na.
Expected vs. actual results
no compilation error vs. compilation error
Minimal code example
Error messages
Compiler and operating system
Linux, clang-16.0.5+gcc-13.1 standard library
Library version
3.11.2
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: