-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fmt::v8: bigint build failure with clang-10 #2490
Comments
e.g. something like
(can make a pr if you want and that sounds ok) |
The error is actually caused by libstdc++ (GCC standard library) headers, not the Clang or libc++ (LLVM standard library) - https://godbolt.org/z/dbqre1TaW. So Clang 10 config has libstdc++ with major version 9, while Clang 11 config has major version 10. (thanks to @phprus for |
libstdc++ defined macro |
I think that the libstdc++ version comes from the gcc version installed on the docker image used, which is what clang will use by default ; what would be interesting is to see whether clang-10 with libstdc++-11 would work. hmm.. |
and indeed, g++-9 in -std=c++2a mode does define __cplusplus to 201709 so this case is not encountered with GCC, only with Clang ✕ libstdc++ |
#if ((__cplusplus >= 202002L) && \
(!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE > 9)) || \
(__cplusplus >= 201709L && FMT_GCC_VERSION >= 1002)
# define FMT_CONSTEXPR20 constexpr
#else
# define FMT_CONSTEXPR20
#endif
|
PR is welcome! |
Yeah, that should work - https://godbolt.org/z/vYP7MWfz9 |
causes
repro: https://godbolt.org/z/nT1TP4Wof ; maybe FMT_CONSTEXPR20 needs to start from clang-11 (where the above code compiles without issues)
The text was updated successfully, but these errors were encountered: