[libcxx-commits] [libcxx] [libc++] Work around new GCC 15 type_traits builtins that can't be used as Clang's can (PR #137871)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 12 00:05:37 PDT 2025


================
@@ -18,7 +18,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if __has_builtin(__add_lvalue_reference)
+#if __has_builtin(__add_lvalue_reference) && __GNUC__ < 15
----------------
philnik777 wrote:

```suggestion
#if __has_builtin(__add_lvalue_reference) && !defined(_LIBCPP_COMPILER_GCC)
```
We usually don't test the version since we support only one and these builtins are new anyways, so there isn't much use to check the version.

https://github.com/llvm/llvm-project/pull/137871


More information about the libcxx-commits mailing list