[libcxx-commits] [libcxx] [libc++] Support more GCC 15 type_traits builtins (PR #137871)
Roland McGrath via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 30 10:52:37 PDT 2025
================
@@ -20,8 +20,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__add_lvalue_reference)
+# if defined(_LIBCPP_COMPILER_GCC)
+template <class _Tp>
+struct __add_lvalue_reference_gcc {
+ using type = __add_lvalue_reference(_Tp);
+};
----------------
frobtech wrote:
I'm trying to understand your interpretation of the policy. In #81386 you made a change that made libc++ work with both GCC 14 (the latest release branch at the time) and with GCC 15, which was unreleased and not a stable branch at the time. So by the policy, that change should not have gone in because only 14 was supported then.
Now, on the day that GCC 15 is released, the policy becomes that only 15 is supported and 14 is no longer supported. But the reality on that day was that 15 did not work and 14 did. By a straightforward and consistent interpretation of the policy, #81386 should not have gone in. By the same policy, at the instant of the GCC 15 release, 15 was the sole supported version--but it was broken, making it impossible for anyone using libc++ to switch to 15 on that day.
AFAICT the policy as written is obviously unworkable because as of today, the time window of GCC support is 5 days. AFAICT the policy as written also applies to me but not to you.
https://github.com/llvm/llvm-project/pull/137871
More information about the libcxx-commits
mailing list