<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/137862>137862</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
No move elision in construction from nested brace-enclosed initializer list
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Fedr
</td>
</tr>
</table>
<pre>
This program
```c++
struct B {
int i, j;
};
struct A {
A(A&&) = delete;
A(const B &) {}
};
A a( { { 1, 2 } } );
```
is accepted by GCC and EDG. But Clang complains:
```
<source>:10:3: error: call to deleted constructor of 'A'
10 | A a( { { 1, 2 } } );
| ^ ~~~~~~~~~~~~
<source>:6:5: note: 'A' has been explicitly marked deleted here
6 | A(A&&) = delete;
| ^
```
Online demo: https://gcc.godbolt.org/z/eT9M59acx
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU02T4yYQ_TWtS9e4pEYf1kEH-UN7SnLZP4BQ22aDwAVosjOH_PYUGnlmMjlkqaYM5nW_91ogQ9BXy9xBdYDqlMkl3pzvBp58Nrrppft-0wHv3l29nCHvoc7fQgEdUuR9iH5REQ8ITdoiImobUQMd8QeI9B80p23xDu8_wXugfQ9Ur9EiiBNObDjyW9IDopwNK88Gaw6p7r-r9yiB9ulsnUUSQQjN6W1SuyEfNiDvdUCpFN8jTzi-4LfjEaWd8Hz6tsPDEvFopL2icvPdSG0DiP5LARDH4BavGMQZRF_kIHoBokf23vm0UNIYjG5zNeHqJLXBeXQXBGp6oCZZLXKE5oi_aAPXkRIQoToj_v1p_FdZDaKvkh7rUm_7BzHeZMCR2SL_vButdDQvOEv_J0_vkm_seWOsN8b__3APHFTnLz37wxptGSeeXRJyi_G-dpYGoOGq1O7qptGZuHP-CjS8Ag38vf2taqX6mU2dmFrRyoy7oimrthJClNmta8uGGyr3F1Hu9-2-rC91QXVbUltVl3ycMt1RTlVeUlu0ORVid7lUbUFKSJWPPDY1lDnPUpudMc9z4s50CAt3hWj2NWVGjmzC-laILP-F6ykQpafju5T0NC7XAGVudIjho0zU0XD3u8PZPTOy0UE7i9p-XIW0v3g3o-WwXkUvFT-xVcYFnlBbHbU0-pU9ptrZ4k33pW063pZxp9wMNCTm7efp7t0PVhFoWPUGoGEz9NzRPwEAAP__uAkj8w">