<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126270>126270</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang does not diagnose an explicit specialization or partial specialization of initializer_list
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
accepts-invalid
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
miyuki
</td>
</tr>
</table>
<pre>
According to the C++ standard (C++23 [initializer.list.syn] paragraph 2):
> If an explicit specialization or partial specialization of `initializer_list` is declared, the program is ill-formed.
It does not say "no diagnostic is required"; therefore, I think Clang must produce an error, but it does not. Example code:
```
#include <initializer_list>
template<>
class std::initializer_list<int> {};
template<typename T>
class std::initializer_list<T*> {};
```
Clang (current trunk version) accepts the code with `-std=c++23 -pedantic-errors`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyck8-O4zYMxp-GvhAxFMpO4oMP-TMB5r73QpEYRx1ZciV5uunTF3KCnUFzKRYQYIAyfx_5kVIp2cEz99AeoD1Vas63EPvR3ucPW12Cufd7rUM01g-YA-Yb4xHoAHTAlJU3KhoE2j1jJBHag_U2W-XsPxxrZ1Ou091De8JJRTVENd2QgDqQexDLkW_4fkXlkX9OzmqbMU2sF4LKNngMseQW5svNFWEjvgn-UQRhI9AmNKydimyAjkvhUwxDVGO5ss6triGObOpHEe8ZTeCEPmRM6o5A5AMaqwYfUra6JEX-a7YLj0AeCjLyNUQu_HfMN-s_8OiUH3CcUy5yZta8NBZjiOW3y5zRfknV-PZTjZNj1MHwlyMb8TxiDySt1242jCCPL53Kt0dK5nFyKjPI4yOmnUoJUzaFKveviUfrSzrC9gDbE8jDCyjfJ_ZqZPzxf5E_gPYvzO_NiP3DIKCdnmNknzHH2X_gJ8dkgwfqUGnNU07LyIot-LfNtzLm1SJ90r92bTWxUT5bvVoMTrARdWV6aTrZqYr79VbuuqYjIapbb7atbEWz4257uTRG6EbRWl25Eay6drerbE-CWkFiu97SphG1McwXkqrbXJXcNGtoBI_Kutq5z7EOcahsSjP3a9rQVlROXdil5SUR6dImyP01Bp_ZLztDRyB6drey_lM5u8TbUxX7wlxd5iFBI4qb6Usl2-y4fxj3a0mfq8m__W7-O75qjq6_5TylMl46A50Hm2_zpdZhBDqXcp6f1RTDn6wz0HlxIAGdnyZ89vRvAAAA__9YY2g3">