[libc++] Use __is_convertible built-in when available
authorRoland McGrath <mcgrathr@google.com>
Thu, 27 Apr 2023 21:18:18 +0000 (14:18 -0700)
committerRoland McGrath <mcgrathr@google.com>
Thu, 27 Apr 2023 21:23:43 +0000 (14:23 -0700)
commit484e64f7e7b2c0494d7b2dbfdd528bcd707ee652
tree8bf6367ad1732cecde15f63926ea549cdd0b4c44
parent61976af3ba9347935e9715067fcc0f5a568e6e7d
[libc++] Use __is_convertible built-in when available

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.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D149313
libcxx/include/__type_traits/is_convertible.h