<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115222>115222</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
pack indexing addition to clang makes some valid C++11 code no longer compile in C++11-23 modes
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pinskia
</td>
</tr>
</table>
<pre>
The example from https://eel.is/c++draft/diff#cpp23.dcl.dcl-2 which describes a different between C++23 and C++26:
```
template <typename... T>
void f(T... [1]);
template <typename... T>
void g(T... ptr[1]);
int main() {
f<int, double>(nullptr, nullptr); // ill-formed in C++26, but for c++11-23 would be void f<int, double>(int [1], double [1])
g<int, double>(nullptr, nullptr); // ok
}
```
No longer compiles in clang 19 with -std=c++11 due to the addition of pack indexing.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyck8-SoywUxZ_murkVSy_558JFJ_my_Fb9AghXZYJgCSbdbz9FYqe7p3ozY2kpCIf7O3BkCKZzzDVsDrA5ZXKOvZ_q0bhwMTJrvH6vX3tGfpPDaBnbyQ_YxzgGEC9AZ6Azs81NADoroAPQQU-yjUBnbdoWSKhxJJFrZdOzIrz1RvWoOajJNBxQYhrIE7uIDccbs8PjQ4kESqefrW1asjhB8QLbYrnvzcjDaGVkBHGM7yM7OXCe5_gK4r_HiKs3Glug_Wvqh82hhM0JqAJx-CuJ7kNijNMPKsZFHKRxQHugCmG39CO2II7GRaAjaj83lpMu7d1sbZKiIz4_kxym62EvGmtXrZ8G1mjcFzPoiM0csfUTLs6X5YoE3vxsNTaMC_SPC6dKnwAfv74a86i7-_ey_WXZq93px03736P1ruMJlR9GYzkkPGWl67Cs8GZij6sQNYjTEw_1zBg9xp5Ram2i8Q59i6NUFzRO85txXf7Qz3QtdCUqmXFd7kRRiYKqddbXRUubXblbt1q0SgghdSG5EcVWbQstWGWmpoLWZVlsqdzsy3VOoqHtfrdXldJSkoZ1wYM0Nrf2OuR-6jITwsx1WW6IKLOyYRvuiSK6AwFRCtdUpwmrZu4CrAtrQgyfEtFEy_U3kk_G6BdnBnnhgMEPjFdpzTMcZYnKa0b3p6tfzszjeAxec8jmydbfY9yZ2M9NrvwAdE5VLa_VOPlfrFKi75Qp6QvotabfAQAA__81WUNT">