[libcxx-commits] [PATCH] D149313: [libc++] Use __is_convertible built-in when available
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 26 20:00:19 PDT 2023
philnik added inline comments.
================
Comment at: libcxx/include/__type_traits/is_convertible.h:27
-#if __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
+#if __has_builtin(__is_convertible) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
+
----------------
mcgrathr wrote:
> philnik wrote:
> > Please add a `//TODO: Remove the #else branch once GCC 13 is used in the CI`.
> I'm not clear on what the TODO intends to be done later.
> Are you saying that you'll remove the fallback for the case of no built-in at all?
> I imagine that would break compatibility with many extant GCC versions that don't have either built-in, wouldn't it?
>
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149313/new/
https://reviews.llvm.org/D149313
More information about the libcxx-commits
mailing list