<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/137704>137704</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libc++ headers vs GCC 15 type traits builtins
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
frobtech
</td>
</tr>
</table>
<pre>
Between GCC 14 and GCC 15, a bunch of new C++ traits builtins were added that Clang already has:
```
1b7cfa715c6 c++: introduce __builtin_is_virtual_base_of
3dab8f8a542 c++: Implement __is_nothrow_invocable built-in trait
7bd33955970 c++: Implement __is_invocable built-in trait
37fad797ade c++: Implement __array_rank built-in trait
142d1d8e057 c++: Implement __decay built-in trait
85c2ba42441 c++: Implement __add_rvalue_reference built-in trait
c08d1afbf53 c++: Implement __add_lvalue_reference built-in trait
86812be98a1 c++: Implement __remove_all_extents built-in trait
e1ca1fa1c7a c++: Implement __remove_extent built-in trait
2763f81e0b9 c++: Implement __add_pointer built-in trait
06d64eb96cd c++: Implement __is_unbounded_array built-in trait
cb5d904c775 c++: Implement __is_pointer built-in trait
9b51b3e79e4 c++: Implement __is_volatile built-in trait
7dd8c905219 c++: Implement __is_const built-in trait
```
Unlike Clang, GCC gets upset if these are used via template aliases rather than only via the standard `...::type` type aliases.
PR #81386 addressed the same issue earlier for `__remove_cv` and `__remove_cvref`.
Equivalent changes are needed for all the other ones where `__has_builtin(...)` has become true in GCC 15.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMlV2P6jYQhn-NuRkd5DgJcS5ywW67Ve-qSr2OxvaEuMfY1HbY8u8rB7bnE3YRUhDKPPPh1-9gSvbgiQbWPrH2lw0ueQ5xmGJQmfS8UcFchifKr0Qefnt-hqoB9Ob6s2XiGRDU4vUMYQJPr_DMxBMTT5Aj2pxALdZl6xO8UiRAY8hAnjHDs0N_AHSR0FxgxsTqPeN7tuO3L99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