<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/83368>83368</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang][C++20] CTAD on aggregates fails with designated initializers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
c++20,
clang:frontend,
rejects-valid
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
duk-37
</td>
</tr>
</table>
<pre>
```cpp
template <int N>
struct A { int f1[N]; };
int main() {
A a1{ {1} }; // compiles fine
A a2{ .f1 = {1} }; // error: no viable constructor or deduction guide for deduction of template arguments of 'T'
}
```
MSVC errors here too, GCC works.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Us2O2zwMfBr6QiSw6R_ZBx_88-U7dS9d9K7YjKOuLAWSvIv26QvFado9FDAsYajhkENK79VimFsoeyjHRG7hal07b2-HXCRnO_9ooUr3b7rdIB0h7QKvNy0DI-SDMgFfIP9vj_jgtilghyB6jKFLBmX_AuUIeY8g4rG_3P_xySqVAaqBmsjacUTEDmUW04DoMxDjg41AJ6ATTna9Kc0eL8rwJxJF0vGSIeTjP8jsnHWQd2gsvit51oyTNXvx1qF1OPO8TUFZg8umZsbLJ8xe8OmBdMu2sgk-okDiFUg8WhTj4_Lbwb9b__L127AX4vHKjjFYCzTg_8OAH9a9-WMyt_nc5I1MuM1E2mSipKpIri3LppFM56Zpaq6EmEtJdVXVsyhSmdVNolpKqUiJmpTKgoqjKIqikUVF01xPZVNAkfIqlT5q_b4erVsS5f3GbZ3nVZ1oeWbt7ytBNAH1QD2lQAQ0RERLs0DeXZw1gc38DDj-zlPwh3ep1R0tx8S1UeJw3hYPRaqVD_6PaFBB31dvuKcsx3h96pUjDq_diNagXBbHiwxx3lJpjx8qXHHmuLwy8IzKqKCkVj_Z-WRzur2GcPOQd_vEFxWu2_k42RXoFOUfx-HmbKwZ6HQ3wAOd7h78CgAA__9bnOgY">