https://github.com/llvm/llvm-project/issues/62396 reports that
GCC 13 barfs on parsing <type_traits> because of the declarations
of struct __is_convertible. In GCC 13, __is_convertible is a
built-in, but __is_convertible_to is not. Clang has both, so
using either should be fine.
Details
- Reviewers
philnik - Group Reviewers
Restricted Project - Commits
- rG484e64f7e7b2: [libc++] Use __is_convertible built-in when available
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM % comment with a green CI.
libcxx/include/__type_traits/is_convertible.h | ||
---|---|---|
27–32 | Please add a //TODO: Remove the #else branch once GCC 13 is used in the CI. |
libcxx/include/__type_traits/is_convertible.h | ||
---|---|---|
27–32 | I'm not clear on what the TODO intends to be done later. |
libcxx/include/__type_traits/is_convertible.h | ||
---|---|---|
27–32 | Yes, that's exactly what I'm saying. We only support the latest released GCC and the last two Clang versions and the one in the same release. People mostly use very recent compiler versions with libc++. Supporting older compilers would be a lot of work for very little benefit. |
I must have misunderstood, does this not fix the problem in https://github.com/llvm/llvm-project/issues/62396 even if there is follow-up work todo?
Yes, it fixes the problem. But I don't see why we would add a release note. We don't support GCC 13 yet, so it's not unexpected that things break.
Please add a //TODO: Remove the #else branch once GCC 13 is used in the CI.