<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63181>63181</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Requires-expressions don't seem to evaluate pack expansions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
accepts-invalid,
concepts
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cjdb
</td>
</tr>
</table>
<pre>
[GCC test `concepts-lambda19` compiles when it shouldn't](https://godbolt.org/z/cjaKdKTcY).
```cpp
// PR c++/103706
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
template<class T> concept C = __is_same(T, int);
template<class... Ts> void f() {
([]() requires C<Ts> { return Ts(); }(), ...); // this expands to C<char> for the second one, which is false
}
template void f<int, int, int>();
template void f<int, int, char>();
```
Note that this also happens with
```cpp
int main()
{
f<int, int, char>();
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVEGPpDYT_TXFpdTI2A0NBw7T9PZ3WGn1aTQ55DQyprrxxNiEMj0z-fURNDObrJJoJQtLZb9X9cr10Mz26olqyI-QnxI9xz5MtXnp2qQN3fsS_1_TYCSOCIUwwRsaI--cHtpOZxUUAk0YRuuI8bUnjzYi92F2nQd5iJCfQJZ9jCODegB5Bnm-hq4NLqZhuoI8_wHybF701-7rk_kVZJWCOIF4gELclxnHLbKC8f-PaEAe13XOhDqI4m_nj798A_WAIHPjtL8-G5PhjmMH6rThpMDdhd991G-74N077m402cv7guGNa_1GGkanI4FqjNPM-ATqC249wAZBnfD52fIz64FAlk8gG7Q-gqxAHf-LKU1TfOKF7RZshxeQJcgK4bChEJfI-ibb0US_z3YixgZUc4fC4YgTxXnyC9d6DdQR4bBhlmrSNP0I39sTe8tIb6P2HWMMK53p9bQQXsKEsSdkMsF3GDwtFK-9NT1axot2TJuqw-mf5H2oUc3aha0Z9019-Szx50BbVT-gPufir_m_hUgYex3v8rTjgL0eR_KMrzb2_zZS1kcctPVbjk3a5xv8dE2f3fjIkHS16ipV6YTqrCiLrCxElSd9XcrqIDMtyRwMmX1VCJNVVdnu9yY31aVNbC2FVKIQpchEpvJ0v-90lUstZaa7XLewFzRo61LnbsPiocQyz1QXKiuzxOmWHK92lnI1AKiHyxR8JN-BlCAbkFKbu4utv2lnv8c_7L0E8lMy1UuOXTtfGfbCWY78PWu00VH9uI3ljt7GiZht8IxdWL2PTDQsM0Y37eblpUdtfrsP33oxmSdX__BvsLGf29SEAeR5ybVtu3EKL2QiyPMql0GeV8V_BgAA__9NgmM0">