<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98261>98261</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] Structured bindings cannot be initialized from braced rvalue arrays
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MagentaTreehouse
</td>
</tr>
</table>
<pre>
The following code fails to compile:
```cpp
struct Array {
int data[2];
};
Array f() { return {}; }
int main() {
auto [a, b]{f().data}; // xvalue init
using T = int [2];
auto [c, d]{T{}}; // prvalue init
}
```
See Compiler Explorer: https://godbolt.org/z/P3EPzWdTc
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckk1vozAQhn_NcBk1MuYzBw5JU24rVWqkPRt7QrxyMPJHt-2vXxmo0o2EMAwz7zPzMsJ7PU5EHVRHqE6ZiOFqXfdLjDQFcXZEVxs9ZYNVn935Snixxti_ehpRWkV4Edp4DBalvc3aEBQHYCdgB6jZesl5XiM-uCgDHpwTnwjNcY0iIuopoBJBQHXkUJ2g2L5B8-N5ua_FF-At8H0SQUchumnRW7IxHT8qkvZN6OlesnFFDBahOgrgzzgkbHPchHdLM5sc74H3-PEuTCTUkw73vqNPPpwRitMyw2P_KecbIxNGrZjz1u1_hNk9Iu6TfHu5vr4R4fNqt8OXj9lYRw6KA15DmH36A4viaNVgTdhZNwLvv4D3r8XL69dvdZaZ6gq1L_Yioy5vOKuaum2a7NrJsqzLsqSc9mVetrWqiLGW2kqquswvbaY7znjJmpwxzvK82VWXeshJKMHLfcNYCyWjm9BmZ8z7LbEz7X2kbt_yOs-MGMj4Zdk4l0ZMI_BkWea6lP80xNFDyYz2wd8Vgg5m2dC1ojrh27JL0ZHCQU9KT6NHKabJBhxWC7Uw-osUXpy94eCEJIWbwyItkc-iM92DYzpc47CT9ga8T_TteJqd_UMyAO-XYTzwfp3nveP_AgAA__9At_UX">