[libcxx-commits] [libcxx] [libc++] Support more GCC 15 type_traits builtins (PR #137871)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 29 13:08:18 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);
+};
----------------
philnik777 wrote:
We should just use `add_lvalue_reference` in the GCC branch in the end. I think it would be better to just disable this branch for the GCC upgrade and do a proper refactoring afterwards. You've probably just copy-pasted what I've done for `remove_cvref`, but that's a bit special, since we've got an internal type trait for versions before `remove_cvref` was added.
https://github.com/llvm/llvm-project/pull/137871
More information about the libcxx-commits
mailing list